Skip to contentSkip to conversation

octeontx2-pf: Set correct sequence for carrier off and tx queue stop

PATCH Applied Ratheesh Kannoth 3 participants 3 messages Jul 24 – Jul 30

Subsystems (3)
lore
Share & tools
lore

Ratheesh Kannoth

author maintainer
#0 lore raw

PATCH 1/1 octeontx2-pf: Set correct sequence for carrier off and tx queue stop

From: Suman Ghosh <[email protected]>

During link down event, we were doing netif_tx_stop_all_queues() first and then netif_carrier_off(). This can cause a potential race since carrier is still on during down event. This patch reverse the calling order to fix the issue.

Fixes 50fe6c02e5ad ("octeontx2-pf: Register and handle link notifications")
---
 drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +1 -1
index 2e33b33ec993..c995f2900859 100644
@@ -889,8 +889,8 @@ static void otx2_handle_link_event(struct otx2_nic *pf)
 		netif_carrier_on(netdev);
 		netif_tx_start_all_queues(netdev);
 	} else {
-		netif_tx_stop_all_queues(netdev);
 		netif_carrier_off(netdev);
+		netif_tx_stop_all_queues(netdev);
 	}
 }
 
Signature · 1 line
2.43.0
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Ratheesh Kannoth

From: Suman Ghosh <[email protected]>

During link down event, we were doing netif_tx_stop_all_queues() first and then netif_carrier_off(). This can cause a potential race since carrier is still on during down event. This patch reverse the calling order to fix the issue.

Fixes 50fe6c02e5ad ("octeontx2-pf: Register and handle link notifications")
#2 lore raw
In reply to Ratheesh Kannoth
This patch was applied to netdev/net.git (main) by Paolo Abeni <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <[email protected]>:

Quoted 8 lines · On Fri, 24 Jul 2026 12:58:31 +0530 you wrote:

From: Suman Ghosh <[email protected]>

During link down event, we were doing netif_tx_stop_all_queues() first and then netif_carrier_off(). This can cause a potential race since carrier is still on during down event. This patch reverse the calling order to fix the issue.

[...]

Here is the summary with links:
- [net] octeontx2-pf: Set correct sequence for carrier off and tx queue stop

    https://git.kernel.org/netdev/net/c/16809472409d

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html