mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-01 00:02:19 -04:00
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>
This commit is contained in:
committed by
Jakub Kicinski
parent
7e19a351b2
commit
beb1e0148e
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user