Skip to content

Commit 6d47b53

Browse files
zhengchaoshaokuba-moo
authored andcommitted
net: cpsw: disable napi in cpsw_ndo_open()
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. Compiled tested only. Fixes: d354eb8 ("drivers: net: cpsw: dual_emac: simplify napi usage") Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Link: https://lore.kernel.org/r/20221109011537.96975-1-shaozhengchao@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 27c064a commit 6d47b53

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/net/ethernet/ti/cpsw.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,8 @@ static int cpsw_ndo_open(struct net_device *ndev)
854854

855855
err_cleanup:
856856
if (!cpsw->usage_count) {
857+
napi_disable(&cpsw->napi_rx);
858+
napi_disable(&cpsw->napi_tx);
857859
cpdma_ctlr_stop(cpsw->dma);
858860
cpsw_destroy_xdp_rxqs(cpsw);
859861
}

0 commit comments

Comments
 (0)