aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/marvell
diff options
context:
space:
mode:
authorZhengchao Shao <shaozhengchao@huawei.com>2022-11-09 10:54:32 +0800
committerPaolo Abeni <pabeni@redhat.com>2022-11-10 13:30:01 +0100
commitf111606b63ff2282428ffbac0447c871eb957b6c (patch)
tree7a06c1f49fddac578ce0c816da4eec3d499cb2c4 /drivers/net/ethernet/marvell
parentethernet: s2io: disable napi when start nic failed in s2io_card_up() (diff)
downloadlinux-dev-f111606b63ff2282428ffbac0447c871eb957b6c.tar.xz
linux-dev-f111606b63ff2282428ffbac0447c871eb957b6c.zip
net: mv643xx_eth: disable napi when init rxq or txq failed in mv643xx_eth_open()
When failed to init rxq or txq in mv643xx_eth_open() for opening device, napi isn't disabled. When open mv643xx_eth device next time, it will trigger a BUG_ON() in napi_enable(). Compile tested only. Fixes: 2257e05c1705 ("mv643xx_eth: get rid of receive-side locking") Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Link: https://lore.kernel.org/r/20221109025432.80900-1-shaozhengchao@huawei.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/ethernet/marvell')
-rw-r--r--drivers/net/ethernet/marvell/mv643xx_eth.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index 707993b445d1..8941f69d93e9 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -2481,6 +2481,7 @@ out_free:
for (i = 0; i < mp->rxq_count; i++)
rxq_deinit(mp->rxq + i);
out:
+ napi_disable(&mp->napi);
free_irq(dev->irq, dev);
return err;