]> git.baikalelectronics.ru Git - kernel.git/commitdiff
atl1c: fix tx timeout after link flap on Mikrotik 10/25G NIC
authorGatis Peisenieks <gatis@mikrotik.com>
Fri, 11 Feb 2022 06:51:23 +0000 (08:51 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 11 Feb 2022 22:41:02 +0000 (14:41 -0800)
If NIC had packets in tx queue at the moment link down event
happened, it could result in tx timeout when link got back up.

Since device has more than one tx queue we need to reset them
accordingly.

Fixes: 486225205a90 ("atl1c: add 4 RX/TX queue support for Mikrotik 10/25G NIC")
Signed-off-by: Gatis Peisenieks <gatis@mikrotik.com>
Link: https://lore.kernel.org/r/20220211065123.4187615-1-gatis@mikrotik.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/atheros/atl1c/atl1c_main.c

index da595242bc13a5379975c1978e87028f8c1d4177..f50604f3e541e5a368df905c6e88ad8cb8f99289 100644 (file)
@@ -900,7 +900,7 @@ static void atl1c_clean_tx_ring(struct atl1c_adapter *adapter,
                atl1c_clean_buffer(pdev, buffer_info);
        }
 
-       netdev_reset_queue(adapter->netdev);
+       netdev_tx_reset_queue(netdev_get_tx_queue(adapter->netdev, queue));
 
        /* Zero out Tx-buffers */
        memset(tpd_ring->desc, 0, sizeof(struct atl1c_tpd_desc) *