From: Russell King (Oracle) Date: Mon, 10 Mar 2025 12:31:30 +0000 (+0000) Subject: net: stmmac: remove unnecessary stmmac_mac_set() in stmmac_release() X-Git-Tag: v6.15-rc1~160^2~97^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=39b0a10d80d6c7573fe94d09635c3931a91065d9;p=thirdparty%2Fkernel%2Flinux.git 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. Reviewed-by: Andrew Lunn Tested-by: Furong Xu <0x1207@gmail.com> Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1trcI6-005rn8-GV@rmk-PC.armlinux.org.uk Signed-off-by: Paolo Abeni --- diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index c2ee6c0af3fd8..839ecebf5f5f3 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -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);