]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rtase: Reset TX subqueue when clearing TX ring
authorJustin Lai <justinlai0215@realtek.com>
Tue, 2 Jun 2026 11:46:59 +0000 (19:46 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 4 Jun 2026 15:35:30 +0000 (08:35 -0700)
rtase_tx_clear() clears the TX ring and resets the ring indexes.
However, the TX queue state and BQL accounting are not reset at
the same time.

This may leave __QUEUE_STATE_STACK_XOFF asserted after
rtase_sw_reset(), preventing new TX packets from being scheduled.

Reset the TX subqueue when clearing the TX ring so the TX queue
state and BQL accounting are restored together.

Fixes: 5a2a2f15244c ("rtase: Implement the rtase_down function")
Cc: stable@vger.kernel.org
Signed-off-by: Justin Lai <justinlai0215@realtek.com>
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Link: https://patch.msgid.link/20260602114659.12335-1-justinlai0215@realtek.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/realtek/rtase/rtase_main.c

index ef13109c49cff576ab58d96796e1bffbfbe872bf..6ccbefb5acf246331037763645e8642b2c6a1b47 100644 (file)
@@ -239,6 +239,8 @@ static void rtase_tx_clear(struct rtase_private *tp)
                rtase_tx_clear_range(ring, ring->dirty_idx, RTASE_NUM_DESC);
                ring->cur_idx = 0;
                ring->dirty_idx = 0;
+
+               netdev_tx_reset_subqueue(tp->dev, i);
        }
 }