Message ID | 20221108025156.327279-1-shaozhengchao@huawei.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net] net: mv643xx_eth: disable napi when init rxq or txq failed in mv643xx_eth_open() | expand |
On Tue, 8 Nov 2022 10:51:56 +0800 Zhengchao Shao wrote: > 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 > report a invalid opcode issue. It will trigger a BUG_ON() in napi_enable() > Fix it. Only be compiled, not be tested. Please replace "Fix it. Only be compiled, not be tested." with "Compile tested only." > Fixes: 527a626601de ("skge/sky2/mv643xx/pxa168: Move the Marvell Ethernet drivers") This is not the commit which added this code, please find out where the code was added.
On 2022/11/9 9:27, Jakub Kicinski wrote: > On Tue, 8 Nov 2022 10:51:56 +0800 Zhengchao Shao wrote: >> 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 >> report a invalid opcode issue. > > It will trigger a BUG_ON() in napi_enable() > >> Fix it. Only be compiled, not be tested. > > Please replace "Fix it. Only be compiled, not be tested." > with "Compile tested only." > >> Fixes: 527a626601de ("skge/sky2/mv643xx/pxa168: Move the Marvell Ethernet drivers") > > This is not the commit which added this code, please find out where > the code was added. Hi Jakub: Thank you for your review. I will fix them in V2. Zhengchao Shao
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 @@ 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;
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 report a invalid opcode issue. Fix it. Only be compiled, not be tested. Fixes: 527a626601de ("skge/sky2/mv643xx/pxa168: Move the Marvell Ethernet drivers") Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> --- drivers/net/ethernet/marvell/mv643xx_eth.c | 1 + 1 file changed, 1 insertion(+)