Commit f9c24397 authored by Florian Fainelli's avatar Florian Fainelli Committed by Baogen Shang
Browse files

net: bcmgenet: Remove phy_stop() from bcmgenet_netif_stop()

stable inclusion
from stable-v5.10.181
commit e92727ed9e8b6798efc1e7ae44bbe7c44c453670
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8L4MY

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e92727ed9e8b6798efc1e7ae44bbe7c44c453670



--------------------------------

[ Upstream commit 93e0401e ]

The call to phy_stop() races with the later call to phy_disconnect(),
resulting in concurrent phy_suspend() calls being run from different
CPUs. The final call to phy_disconnect() ensures that the PHY is
stopped and suspended, too.

Fixes: c96e731c ("net: bcmgenet: connect and disconnect from the PHY state machine")
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarDapeng Yu <dapeng.yu@windriver.com>
parent db504846
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -3408,7 +3408,6 @@ static void bcmgenet_netif_stop(struct net_device *dev)
	/* Disable MAC transmit. TX DMA disabled must be done before this */
	umac_enable_set(priv, CMD_TX_EN, false);

	phy_stop(dev->phydev);
	bcmgenet_disable_rx_napi(priv);
	bcmgenet_intr_disable(priv);