Netdev List
 help / color / mirror / Atom feed
* [PATCH net] octeontx2-pf: Set correct sequence for carrier off and tx queue stop
@ 2026-07-24  7:28 Ratheesh Kannoth
  2026-07-28 16:50 ` Simon Horman
  2026-07-30 11:00 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Ratheesh Kannoth @ 2026-07-24  7:28 UTC (permalink / raw)
  To: davem, lcherian, linux-kernel, netdev, sgoutham, tduszynski
  Cc: andrew+netdev, edumazet, kuba, pabeni, Suman Ghosh,
	Ratheesh Kannoth

From: Suman Ghosh <sumang@marvell.com>

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")
Signed-off-by: Suman Ghosh <sumang@marvell.com>
Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
index 2e33b33ec993..c995f2900859 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
@@ -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);
 	}
 }
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] octeontx2-pf: Set correct sequence for carrier off and tx queue stop
  2026-07-24  7:28 [PATCH net] octeontx2-pf: Set correct sequence for carrier off and tx queue stop Ratheesh Kannoth
@ 2026-07-28 16:50 ` Simon Horman
  2026-07-30 11:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2026-07-28 16:50 UTC (permalink / raw)
  To: Ratheesh Kannoth
  Cc: davem, lcherian, linux-kernel, netdev, sgoutham, tduszynski,
	andrew+netdev, edumazet, kuba, pabeni, Suman Ghosh

On Fri, Jul 24, 2026 at 12:58:31PM +0530, Ratheesh Kannoth wrote:
> From: Suman Ghosh <sumang@marvell.com>
> 
> 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")
> Signed-off-by: Suman Ghosh <sumang@marvell.com>
> Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>

Reviewed-by: Simon Horman <horms@kernel.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] octeontx2-pf: Set correct sequence for carrier off and tx queue stop
  2026-07-24  7:28 [PATCH net] octeontx2-pf: Set correct sequence for carrier off and tx queue stop Ratheesh Kannoth
  2026-07-28 16:50 ` Simon Horman
@ 2026-07-30 11:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-07-30 11:00 UTC (permalink / raw)
  To: Ratheesh Kannoth
  Cc: davem, lcherian, linux-kernel, netdev, sgoutham, tduszynski,
	andrew+netdev, edumazet, kuba, pabeni, sumang

Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Fri, 24 Jul 2026 12:58:31 +0530 you wrote:
> From: Suman Ghosh <sumang@marvell.com>
> 
> 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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-30 11:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-24  7:28 [PATCH net] octeontx2-pf: Set correct sequence for carrier off and tx queue stop Ratheesh Kannoth
2026-07-28 16:50 ` Simon Horman
2026-07-30 11:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox