]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: axienet: start napi before enabling Rx/Tx
authorAndy Chiu <andy.chiu@sifive.com>
Fri, 26 Jul 2024 07:06:50 +0000 (15:06 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 11 Aug 2024 10:57:51 +0000 (12:57 +0200)
[ Upstream commit 799a829507506924add8a7620493adc1c3cfda30 ]

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>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/xilinx/xilinx_axienet_main.c

index c29809cd92015a2b9d9bc936f3592b6165505d9e..fa510f4e26008f7cf5b3c45488879e7b62a2ab80 100644 (file)
@@ -2219,9 +2219,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);
 }
 
 /**