]> www.infradead.org Git - users/hch/misc.git/commitdiff
net: stmmac: convert to use phy_eee_rx_clock_stop()
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 8 Jan 2025 16:48:19 +0000 (16:48 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 11 Jan 2025 01:51:01 +0000 (17:51 -0800)
Convert stmmac to use phy_eee_rx_clock_stop() to set the PHY receive
clock stop in LPI setting, rather than calling the legacy
phy_init_eee() function.

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/E1tVZEB-0002Ke-RZ@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

index 360d67ba648394a370685addec03c81841b7c7e0..5ea1470af3f3b38ec7df38799c79f50b383d1f71 100644 (file)
@@ -1077,10 +1077,10 @@ 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 = phy->enable_tx_lpi &&
-                       phy_init_eee(phy, !(priv->plat->flags &
-                               STMMAC_FLAG_RX_CLK_RUNS_IN_LPI)) >= 0;
+               phy_eee_rx_clock_stop(phy, !(priv->plat->flags &
+                                            STMMAC_FLAG_RX_CLK_RUNS_IN_LPI));
                priv->tx_lpi_timer = phy->eee_cfg.tx_lpi_timer;
+               priv->eee_active = phy->enable_tx_lpi;
                priv->eee_enabled = stmmac_eee_init(priv);
                stmmac_set_eee_pls(priv, priv->hw, true);
        }