diff mbox series

[net] net: cpsw: disable napi in cpsw_ndo_open()

Message ID 20221109011537.96975-1-shaozhengchao@huawei.com (mailing list archive)
State Accepted
Commit 6d47b53fb3f363a74538a1dbd09954af3d8d4131
Delegated to: Netdev Maintainers
Headers show
Series [net] net: cpsw: disable napi in cpsw_ndo_open() | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 14 of 14 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

shaozhengchao Nov. 9, 2022, 1:15 a.m. UTC
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(+)

Comments

Jakub Kicinski Nov. 10, 2022, 2:31 a.m. UTC | #1
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 :)
patchwork-bot+netdevbpf@kernel.org Nov. 10, 2022, 2:40 a.m. UTC | #2
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!
diff mbox series

Patch

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);
 	}