netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/ncsi: clear Tx enable mode when handling a Config required AEN
@ 2023-04-25 13:30 cchoux
  2023-04-25 15:38 ` Jakub Kicinski
  0 siblings, 1 reply; 4+ messages in thread
From: cchoux @ 2023-04-25 13:30 UTC (permalink / raw)
  To: sam, davem, edumazet, kuba, pabeni
  Cc: netdev, linux-kernel, cosmo.chou, cchoux

Clear the channel Tx enable flag before reconfiguring the channel
when handling a Configuration Required AEN. To avoid misjudging that
the channel Tx has been enabled, which results in the Enable Channel
Network Tx command not being sent during channel reconfiguration.

Signed-off-by: cchoux <chou.cosmo@gmail.com>
---
 net/ncsi/ncsi-aen.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ncsi/ncsi-aen.c b/net/ncsi/ncsi-aen.c
index b635c194f0a8..62fb1031763d 100644
--- a/net/ncsi/ncsi-aen.c
+++ b/net/ncsi/ncsi-aen.c
@@ -165,6 +165,7 @@ static int ncsi_aen_handler_cr(struct ncsi_dev_priv *ndp,
 	nc->state = NCSI_CHANNEL_INACTIVE;
 	list_add_tail_rcu(&nc->link, &ndp->channel_queue);
 	spin_unlock_irqrestore(&ndp->lock, flags);
+	nc->modes[NCSI_MODE_TX_ENABLE].enable = 0;
 
 	return ncsi_process_next_channel(ndp);
 }
-- 
2.34.1


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

* Re: [PATCH] net/ncsi: clear Tx enable mode when handling a Config required AEN
  2023-04-25 13:30 [PATCH] net/ncsi: clear Tx enable mode when handling a Config required AEN cchoux
@ 2023-04-25 15:38 ` Jakub Kicinski
  2023-04-26  8:13   ` [PATCH v2] " Cosmo Chou
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2023-04-25 15:38 UTC (permalink / raw)
  To: cchoux; +Cc: sam, davem, edumazet, pabeni, netdev, linux-kernel, cosmo.chou

On Tue, 25 Apr 2023 21:30:14 +0800 cchoux wrote:
> Clear the channel Tx enable flag before reconfiguring the channel
> when handling a Configuration Required AEN. To avoid misjudging that
> the channel Tx has been enabled, which results in the Enable Channel
> Network Tx command not being sent during channel reconfiguration.
> 
> Signed-off-by: cchoux <chou.cosmo@gmail.com>

Please add a Fixes tag pointing to the commit which introduced 
the problem.

Please use your legal name like you would for signing a legal document
(all UTF-8 characters are allowed).

-- 
pw-bot: cr

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

* [PATCH v2] net/ncsi: clear Tx enable mode when handling a Config required AEN
  2023-04-25 15:38 ` Jakub Kicinski
@ 2023-04-26  8:13   ` Cosmo Chou
  2023-04-28  8:40     ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 4+ messages in thread
From: Cosmo Chou @ 2023-04-26  8:13 UTC (permalink / raw)
  To: kuba, davem, edumazet, pabeni, sam
  Cc: linux-kernel, netdev, chou.cosmo, cosmo.chou

ncsi_channel_is_tx() determines whether a given channel should be
used for Tx or not. However, when reconfiguring the channel by
handling a Configuration Required AEN, there is a misjudgment that
the channel Tx has already been enabled, which results in the Enable
Channel Network Tx command not being sent.

Clear the channel Tx enable flag before reconfiguring the channel to
avoid the misjudgment.

Fixes: 8d951a75d022 ("net/ncsi: Configure multi-package, multi-channel modes with failover")
Signed-off-by: Cosmo Chou <chou.cosmo@gmail.com>
---
 net/ncsi/ncsi-aen.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ncsi/ncsi-aen.c b/net/ncsi/ncsi-aen.c
index b635c194f0a8..62fb1031763d 100644
--- a/net/ncsi/ncsi-aen.c
+++ b/net/ncsi/ncsi-aen.c
@@ -165,6 +165,7 @@ static int ncsi_aen_handler_cr(struct ncsi_dev_priv *ndp,
 	nc->state = NCSI_CHANNEL_INACTIVE;
 	list_add_tail_rcu(&nc->link, &ndp->channel_queue);
 	spin_unlock_irqrestore(&ndp->lock, flags);
+	nc->modes[NCSI_MODE_TX_ENABLE].enable = 0;
 
 	return ncsi_process_next_channel(ndp);
 }
-- 
2.34.1


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

* Re: [PATCH v2] net/ncsi: clear Tx enable mode when handling a Config required AEN
  2023-04-26  8:13   ` [PATCH v2] " Cosmo Chou
@ 2023-04-28  8:40     ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-04-28  8:40 UTC (permalink / raw)
  To: Cosmo Chou
  Cc: kuba, davem, edumazet, pabeni, sam, linux-kernel, netdev,
	cosmo.chou

Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:

On Wed, 26 Apr 2023 16:13:50 +0800 you wrote:
> ncsi_channel_is_tx() determines whether a given channel should be
> used for Tx or not. However, when reconfiguring the channel by
> handling a Configuration Required AEN, there is a misjudgment that
> the channel Tx has already been enabled, which results in the Enable
> Channel Network Tx command not being sent.
> 
> Clear the channel Tx enable flag before reconfiguring the channel to
> avoid the misjudgment.
> 
> [...]

Here is the summary with links:
  - [v2] net/ncsi: clear Tx enable mode when handling a Config required AEN
    https://git.kernel.org/netdev/net/c/6f75cd166a5a

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] 4+ messages in thread

end of thread, other threads:[~2023-04-28  8:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-25 13:30 [PATCH] net/ncsi: clear Tx enable mode when handling a Config required AEN cchoux
2023-04-25 15:38 ` Jakub Kicinski
2023-04-26  8:13   ` [PATCH v2] " Cosmo Chou
2023-04-28  8:40     ` 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;
as well as URLs for NNTP newsgroup(s).