All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: cpsw: disable napi in cpsw_ndo_open()
@ 2022-11-09  1:15 Zhengchao Shao
  2022-11-10  2:31 ` Jakub Kicinski
  2022-11-10  2:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Zhengchao Shao @ 2022-11-09  1:15 UTC (permalink / raw)
  To: linux-omap, netdev, bpf, grygorii.strashko, davem, edumazet,
	kuba, pabeni
  Cc: ast, daniel, hawk, john.fastabend, chi.minghao, mkl, wsa+renesas,
	ardb, yangyingliang, mugunthanvnm, weiyongjun1, yuehaibing,
	shaozhengchao

When failed to create xdp rxqs or fill rx channels in cpsw_ndo_open() for
opening device, napi isn't disabled. When open cpsw device next time, it
will report a invalid opcode issue. Fix it. Only be compiled, not be
tested.

Fixes: d354eb85d618 ("drivers: net: cpsw: dual_emac: simplify napi usage")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
---
 drivers/net/ethernet/ti/cpsw.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 709ca6dd6ecb..13c9c2d6b79b 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -854,6 +854,8 @@ static int cpsw_ndo_open(struct net_device *ndev)
 
 err_cleanup:
 	if (!cpsw->usage_count) {
+		napi_disable(&cpsw->napi_rx);
+		napi_disable(&cpsw->napi_tx);
 		cpdma_ctlr_stop(cpsw->dma);
 		cpsw_destroy_xdp_rxqs(cpsw);
 	}
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] net: cpsw: disable napi in cpsw_ndo_open()
  2022-11-09  1:15 [PATCH net] net: cpsw: disable napi in cpsw_ndo_open() Zhengchao Shao
@ 2022-11-10  2:31 ` Jakub Kicinski
  2022-11-10  2:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2022-11-10  2:31 UTC (permalink / raw)
  To: Zhengchao Shao
  Cc: linux-omap, netdev, bpf, grygorii.strashko, davem, edumazet,
	pabeni, ast, daniel, hawk, john.fastabend, chi.minghao, mkl,
	wsa+renesas, ardb, yangyingliang, mugunthanvnm, weiyongjun1,
	yuehaibing

On Wed, 9 Nov 2022 09:15:37 +0800 Zhengchao Shao wrote:
> When failed to create xdp rxqs or fill rx channels in cpsw_ndo_open() for
> opening device, napi isn't disabled. When open cpsw device next time, it
> will report a invalid opcode issue. Fix it. Only be compiled, not be
> tested.
> 
> Fixes: d354eb85d618 ("drivers: net: cpsw: dual_emac: simplify napi usage")

Nice work, not a trivial Fixes tag to zero in on, I appreciate 
the improvement :)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] net: cpsw: disable napi in cpsw_ndo_open()
  2022-11-09  1:15 [PATCH net] net: cpsw: disable napi in cpsw_ndo_open() Zhengchao Shao
  2022-11-10  2:31 ` Jakub Kicinski
@ 2022-11-10  2:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-11-10  2:40 UTC (permalink / raw)
  To: Zhengchao Shao
  Cc: linux-omap, netdev, bpf, grygorii.strashko, davem, edumazet,
	kuba, pabeni, ast, daniel, hawk, john.fastabend, chi.minghao,
	mkl, wsa+renesas, ardb, yangyingliang, mugunthanvnm, weiyongjun1,
	yuehaibing

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 9 Nov 2022 09:15:37 +0800 you wrote:
> When failed to create xdp rxqs or fill rx channels in cpsw_ndo_open() for
> opening device, napi isn't disabled. When open cpsw device next time, it
> will report a invalid opcode issue. Fix it. Only be compiled, not be
> tested.
> 
> Fixes: d354eb85d618 ("drivers: net: cpsw: dual_emac: simplify napi usage")
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> 
> [...]

Here is the summary with links:
  - [net] net: cpsw: disable napi in cpsw_ndo_open()
    https://git.kernel.org/netdev/net/c/6d47b53fb3f3

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-10  2:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-09  1:15 [PATCH net] net: cpsw: disable napi in cpsw_ndo_open() Zhengchao Shao
2022-11-10  2:31 ` Jakub Kicinski
2022-11-10  2:40 ` patchwork-bot+netdevbpf

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.