Skip to contentSkip to conversation

net: stmmac: remove unnecessary stmmac_mac_set() in stmmac_release()

PATCH Applied Russell King (Oracle) 2 participants 2 messages Mar 14, 2025 – Mar 17, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

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
index c2ee6c0af3fd..839ecebf5f5f 100644
@@ -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
#1 lore raw
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() 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.

[...]

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