Skip to content

Commit

Permalink
net: mv643xx_eth: disable napi when init rxq or txq failed in mv643xx…
Browse files Browse the repository at this point in the history
…_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: 2257e05 ("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>
  • Loading branch information
Zhengchao Shao authored and Paolo Abeni committed Nov 10, 2022
1 parent 0348c1a commit f111606
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/marvell/mv643xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -2481,6 +2481,7 @@ static int mv643xx_eth_open(struct net_device *dev)
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;
Expand Down

0 comments on commit f111606

Please sign in to comment.