net: stmmac: remove unnecessary stmmac_mac_set() in stmmac_release()
Subsystems (4)
PATCH 1/1 net: stmmac: remove unnecessary stmmac_mac_set() in stmmac_release()
stmmac_release() calls phylink_stop() and then goes on to call stmmac_mac_set(, false). However, phylink_stop() will call stmmac_mac_link_down() before returning, which will do this work. Remove this unnecessary call.
--- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 --- 1 file changed, 3 deletions(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +0 -3
@@ -4129,9 +4129,6 @@ static int stmmac_release(struct net_device *dev)/* Release and free the Rx/Tx resources */ free_dma_desc_resources (priv, &priv->dma_conf); -/* Disable the MAC Rx/Tx */ -stmmac_mac_set (priv, priv->ioaddr, false); -/* Powerdown Serdes if there is */ if (priv->plat->serdes_powerdown) priv->plat->serdes_powerdown (dev, priv->plat->bsp_priv);
Signature · 1 line
2.30.2
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Quoted 10 lines · On Fri, 14 Mar 2025 18:02:44 +0000 you wrote:
stmmac_release()callsphylink_stop()and then goes on to callstmmac_mac_set(, false). However,phylink_stop()will callstmmac_mac_link_down()before returning, which will do this work. Remove this unnecessary call.Reviewed-by Andrew Lunn <[email protected]>Tested-by Furong Xu <[email protected]>Signed-off-by Russell King (Oracle) <[email protected]>[...]
Here is the summary with links:
- [net-next] net: stmmac: remove unnecessary stmmac_mac_set() in stmmac_release()
https://git.kernel.org/netdev/net-next/c/39b0a10d80d6
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html