summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2025-01-08 16:47:54 +0000
committerJakub Kicinski <kuba@kernel.org>2025-01-10 17:51:01 -0800
commitbeb1e0148e6da2534113245cebdfcbb2381b6bca (patch)
treeea04de3e01e599d5d6433741ffe66920de58dc69
parent7e19a351b22d585086d16cbc6ea7c613fb12e2da (diff)
downloadlinux-beb1e0148e6da2534113245cebdfcbb2381b6bca.tar.gz
linux-beb1e0148e6da2534113245cebdfcbb2381b6bca.zip
net: stmmac: make EEE depend on phy->enable_tx_lpi
Make stmmac EEE depend on phylib's evaluation of user settings and PHY negotiation, as indicated by phy->enable_tx_lpi. This will ensure when phylib has evaluated that the user has disabled LPI, phy_init_eee() will not be called, and priv->eee_active will be false, causing LPI/EEE to be disabled. This is an interim measure - phy_init_eee() will be removed in a later patch. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tVZDm-0002K9-9w@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 136839165cd5..51799eb672f7 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -1083,7 +1083,7 @@ static void stmmac_mac_link_up(struct phylink_config *config,
stmmac_mac_set(priv, priv->ioaddr, true);
if (phy && priv->dma_cap.eee) {
- priv->eee_active =
+ priv->eee_active = phy->enable_tx_lpi &&
phy_init_eee(phy, !(priv->plat->flags &
STMMAC_FLAG_RX_CLK_RUNS_IN_LPI)) >= 0;
priv->tx_lpi_timer = phy->eee_cfg.tx_lpi_timer;