diff mbox series

net: axienet: start napi before enabling Rx/Tx

Message ID 20240726-dev-andyc-net-fixes-v1-1-15a98b79afb4@sifive.com (mailing list archive)
State Accepted
Commit 799a829507506924add8a7620493adc1c3cfda30
Delegated to: Netdev Maintainers
Headers show
Series net: axienet: start napi before enabling Rx/Tx | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 42 this patch: 42
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 3 maintainers not CCed: paul.walmsley@sifive.com samuel.holland@sifive.com linux-riscv@lists.infradead.org
netdev/build_clang success Errors and warnings before: 43 this patch: 43
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
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: 45 this patch: 45
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 10 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 3 this patch: 3
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-07-26--15-00 (tests: 707)

Commit Message

Andy Chiu July 26, 2024, 7:06 a.m. UTC
softirq may get lost if an Rx interrupt comes before we call
napi_enable. Move napi_enable in front of axienet_setoptions(), which
turns on the device, to address the issue.

Link: https://lists.gnu.org/archive/html/qemu-devel/2024-07/msg06160.html
Fixes: cc37610caaf8 ("net: axienet: implement NAPI and GRO receive")
Signed-off-by: Andy Chiu <andy.chiu@sifive.com>
---
 drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


---
base-commit: 80532af22b67cb83736f62feaeba483b2a5f74db
change-id: 20240726-dev-andyc-net-fixes-306f825878c4

Best regards,

Comments

Eric Dumazet July 26, 2024, 7:41 a.m. UTC | #1
On Fri, Jul 26, 2024 at 9:06 AM Andy Chiu <andy.chiu@sifive.com> wrote:
>
> softirq may get lost if an Rx interrupt comes before we call
> napi_enable. Move napi_enable in front of axienet_setoptions(), which
> turns on the device, to address the issue.
>
> Link: https://lists.gnu.org/archive/html/qemu-devel/2024-07/msg06160.html
> Fixes: cc37610caaf8 ("net: axienet: implement NAPI and GRO receive")
> Signed-off-by: Andy Chiu <andy.chiu@sifive.com>

SGTM, although the axienet_setoptions name is a bit confusing...

Reviewed-by: Eric Dumazet <edumazet@google.com>
patchwork-bot+netdevbpf@kernel.org July 29, 2024, 11:24 a.m. UTC | #2
Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:

On Fri, 26 Jul 2024 15:06:50 +0800 you wrote:
> softirq may get lost if an Rx interrupt comes before we call
> napi_enable. Move napi_enable in front of axienet_setoptions(), which
> turns on the device, to address the issue.
> 
> Link: https://lists.gnu.org/archive/html/qemu-devel/2024-07/msg06160.html
> Fixes: cc37610caaf8 ("net: axienet: implement NAPI and GRO receive")
> Signed-off-by: Andy Chiu <andy.chiu@sifive.com>
> 
> [...]

Here is the summary with links:
  - net: axienet: start napi before enabling Rx/Tx
    https://git.kernel.org/netdev/net/c/799a82950750

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
index db7640529ce7..6fb48268b47c 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -1849,9 +1849,9 @@  static void axienet_dma_err_handler(struct work_struct *work)
 			   ~(XAE_OPTION_TXEN | XAE_OPTION_RXEN));
 	axienet_set_mac_address(ndev, NULL);
 	axienet_set_multicast_list(ndev);
-	axienet_setoptions(ndev, lp->options);
 	napi_enable(&lp->napi_rx);
 	napi_enable(&lp->napi_tx);
+	axienet_setoptions(ndev, lp->options);
 }
 
 /**