]> git.itanic.dy.fi Git - linux-stable/commitdiff
net: bcmgenet: Remove phy_stop() from bcmgenet_netif_stop()
authorFlorian Fainelli <f.fainelli@gmail.com>
Thu, 4 May 2023 23:07:27 +0000 (16:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 May 2023 16:36:51 +0000 (17:36 +0100)
[ Upstream commit 93e0401e0fc0c54b0ac05b687cd135c2ac38187c ]

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: c96e731c93ff ("net: bcmgenet: connect and disconnect from the PHY state machine")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/broadcom/genet/bcmgenet.c

index 92cd2916e80154e11eba8d4bf45a033360e93e8a..35bf840716d5788bc892d28735dfe2e40d545e9b 100644 (file)
@@ -3416,7 +3416,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);