openwrt/target/linux/bcm63xx/patches-5.4/047-bcm63xx_enet-fix-kernel-panic.patch
Álvaro Fernández Rojas 7d12f29ae1 bcm63xx: fix bcm63xx ethernet kernel panics
Calling netdev_reset_queue() from _stop() functions is causing sporadic kernel
panics on bcm63xx, which happen mainly on BCM6318 and BCM6328.
This reverts to the previous behaviour, which called netdev_reset_queue() from
_open() functions.

Tested on Comtrend AR-5315u (BCM6318).

Fixes: 1d6f422e34 ("bcm63xx: sync ethernet driver with net-next")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2021-01-28 12:01:14 +01:00

36 lines
949 B
Diff

--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -1105,6 +1105,8 @@ static int bcm_enet_open(struct net_devi
else
bcm_enet_adjust_link(dev);
+ netdev_reset_queue(dev);
+
netif_start_queue(dev);
return 0;
@@ -1193,7 +1195,6 @@ static int bcm_enet_stop(struct net_devi
kdev = &priv->pdev->dev;
netif_stop_queue(dev);
- netdev_reset_queue(dev);
napi_disable(&priv->napi);
if (priv->has_phy)
phy_stop(dev->phydev);
@@ -2267,6 +2268,7 @@ static int bcm_enetsw_open(struct net_de
enet_dmac_writel(priv, ENETDMAC_IR_PKTDONE_MASK,
ENETDMAC_IRMASK, priv->tx_chan);
+ netdev_reset_queue(dev);
netif_carrier_on(dev);
netif_start_queue(dev);
@@ -2348,7 +2350,6 @@ static int bcm_enetsw_stop(struct net_de
del_timer_sync(&priv->swphy_poll);
netif_stop_queue(dev);
- netdev_reset_queue(dev);
napi_disable(&priv->napi);
del_timer_sync(&priv->rx_timeout);