summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2025-02-28 11:11:57 +0000
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2025-04-04 14:39:26 +0100
commitebabac3e17c2658c8be22699c7fd68732f4ff902 (patch)
treec298b2adc8cd18a08b0d5e3d055ae4e26e06dee1
parent421590b1718636958c9b26d807e37c785f06a5bd (diff)
net: stmmac: move phylink_resume() after resume setup is complete
Move phylink_resume() to be after the setup in stmmac_resume() has completed, as phylink_resume() may result in an immediate call to the .mac_link_up method, which will enable the transmitter and receiver, and enable the transmit queues. This behaviour has been witnessed by Jon Hunter on the Jetson TX2 platform (Tegra 186). Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 16ee87318d34..3afb1b3b83f0 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -7912,12 +7912,6 @@ int stmmac_resume(struct device *dev)
}
rtnl_lock();
- phylink_resume(priv->phylink);
- if (device_may_wakeup(priv->device) && !priv->plat->pmt)
- phylink_speed_up(priv->phylink);
- rtnl_unlock();
-
- rtnl_lock();
mutex_lock(&priv->lock);
stmmac_reset_queues_param(priv);
@@ -7935,6 +7929,11 @@ int stmmac_resume(struct device *dev)
stmmac_enable_all_dma_irq(priv);
mutex_unlock(&priv->lock);
+
+ phylink_resume(priv->phylink);
+ if (device_may_wakeup(priv->device) && !priv->plat->pmt)
+ phylink_speed_up(priv->phylink);
+
rtnl_unlock();
netif_device_attach(ndev);