rtase: Reset TX subqueue when clearing TX ring
Subsystems (4)
Justin Lai
maintainerPATCH v2 1/1 rtase: Reset TX subqueue when clearing TX ring
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.
---
v1 -> v2:
- Target net tree.
- Add Fixes tag.
--- drivers/net/ethernet/realtek/rtase/rtase_main.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/realtek/rtase/rtase_main.c +2 -0
@@ -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); } }
Signature · 1 line
2.40.1
Justin Lai
maintainerQuoted 37 lines · Justin Lai
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_XOFFasserted afterrtase_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")Signed-off-by Justin Lai <[email protected]>---
v1 -> v2:
- Target net tree.
- Add Fixes tag.--- drivers/net/ethernet/realtek/rtase/rtase_main.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/ethernet/realtek/rtase/rtase_main.c +2
-1@@ -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); } } --
Quoted 1 line
2.40.1
Adding Olek, who was accidentally missed from the CC list.
Alexander Lobakin
Reviewed-byFrom: Justin Lai <[email protected]>
Date: Wed, 3 Jun 2026 03:21:34 +0000
Quoted 37 lines
Quoted 36 lines · Justin Lai
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_XOFFasserted afterrtase_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")Signed-off-by Justin Lai <[email protected]>---
v1 -> v2:
- Target net tree.
- Add Fixes tag.--- drivers/net/ethernet/realtek/rtase/rtase_main.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/ethernet/realtek/rtase/rtase_main.c +2
-0@@ -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); } }
Quoted 4 lines
Quoted 2 lines
--
2.40.1Adding Olek, who was accidentally missed from the CC list.
Thanks,
Olek
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Tue, 2 Jun 2026 19:46:59 +0800 you wrote:
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_XOFFasserted afterrtase_sw_reset(), preventing new TX packets from being scheduled.[...]
Here is the summary with links:
- [net,v2] rtase: Reset TX subqueue when clearing TX ring
https://git.kernel.org/netdev/net/c/ab1ecaabe74b
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html