* [PATCH net] net: mv643xx_eth: disable napi when init rxq or txq failed in mv643xx_eth_open()
@ 2022-11-08 2:51 Zhengchao Shao
2022-11-09 1:27 ` Jakub Kicinski
0 siblings, 1 reply; 3+ messages in thread
From: Zhengchao Shao @ 2022-11-08 2:51 UTC (permalink / raw)
To: netdev, sebastian.hesselbarth, davem, edumazet, kuba, pabeni
Cc: jeffrey.t.kirsher, weiyongjun1, yuehaibing, shaozhengchao
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(+)
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;
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: mv643xx_eth: disable napi when init rxq or txq failed in mv643xx_eth_open()
2022-11-08 2:51 [PATCH net] net: mv643xx_eth: disable napi when init rxq or txq failed in mv643xx_eth_open() Zhengchao Shao
@ 2022-11-09 1:27 ` Jakub Kicinski
2022-11-09 1:42 ` shaozhengchao
0 siblings, 1 reply; 3+ messages in thread
From: Jakub Kicinski @ 2022-11-09 1:27 UTC (permalink / raw)
To: Zhengchao Shao
Cc: netdev, sebastian.hesselbarth, davem, edumazet, pabeni,
jeffrey.t.kirsher, weiyongjun1, yuehaibing
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: mv643xx_eth: disable napi when init rxq or txq failed in mv643xx_eth_open()
2022-11-09 1:27 ` Jakub Kicinski
@ 2022-11-09 1:42 ` shaozhengchao
0 siblings, 0 replies; 3+ messages in thread
From: shaozhengchao @ 2022-11-09 1:42 UTC (permalink / raw)
To: Jakub Kicinski
Cc: netdev, sebastian.hesselbarth, davem, edumazet, pabeni,
jeffrey.t.kirsher, weiyongjun1, yuehaibing
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-09 1:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-08 2:51 [PATCH net] net: mv643xx_eth: disable napi when init rxq or txq failed in mv643xx_eth_open() Zhengchao Shao
2022-11-09 1:27 ` Jakub Kicinski
2022-11-09 1:42 ` shaozhengchao
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.