Skip to content

Commit beb1e01

Browse files
Russell King (Oracle)kuba-moo
authored andcommitted
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 <[email protected]> Tested-by: Choong Yong Liang <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 7e19a35 commit beb1e01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,7 @@ static void stmmac_mac_link_up(struct phylink_config *config,
10831083

10841084
stmmac_mac_set(priv, priv->ioaddr, true);
10851085
if (phy && priv->dma_cap.eee) {
1086-
priv->eee_active =
1086+
priv->eee_active = phy->enable_tx_lpi &&
10871087
phy_init_eee(phy, !(priv->plat->flags &
10881088
STMMAC_FLAG_RX_CLK_RUNS_IN_LPI)) >= 0;
10891089
priv->tx_lpi_timer = phy->eee_cfg.tx_lpi_timer;

0 commit comments

Comments
 (0)