[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241112072447.3238892-3-yong.liang.choong@linux.intel.com>
Date: Tue, 12 Nov 2024 15:24:47 +0800
From: Choong Yong Liang <yong.liang.choong@...ux.intel.com>
To: Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>
Cc: netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org
Subject: [PATCH net v1 2/2] net: stmmac: update eee_cfg after mac link up/down
Update the eee_cfg values during link-up/down to ensure that
'ethtool --show-eee <devname>' works correctly.
Fixes: fe0d4fd9285e ("net: phy: Keep track of EEE configuration")
Cc: <stable@...r.kernel.org>
Signed-off-by: Choong Yong Liang <yong.liang.choong@...ux.intel.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 7bf275f127c9..1e16c2d8f951 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -1005,6 +1005,8 @@ static void stmmac_mac_link_down(struct phylink_config *config,
priv->tx_lpi_enabled = false;
priv->eee_enabled = stmmac_eee_init(priv);
stmmac_set_eee_pls(priv, priv->hw, false);
+ phy_update_eee(priv->dev->phydev, priv->tx_lpi_enabled, priv->eee_enabled,
+ priv->tx_lpi_timer);
if (priv->dma_cap.fpesel)
stmmac_fpe_link_state_handle(priv, false);
@@ -1118,6 +1120,8 @@ static void stmmac_mac_link_up(struct phylink_config *config,
priv->eee_enabled = stmmac_eee_init(priv);
priv->tx_lpi_enabled = priv->eee_enabled;
stmmac_set_eee_pls(priv, priv->hw, true);
+ phy_update_eee(phy, priv->tx_lpi_enabled, priv->eee_enabled,
+ priv->tx_lpi_timer);
}
if (priv->dma_cap.fpesel)
--
2.34.1
Powered by blists - more mailing lists