Skip to contentSkip to conversation

net/ncsi: clear Tx enable mode when handling a Config required AEN

PATCH Superseded cchoux 3 participants 4 messages Apr 25, 2023 – Apr 28, 2023

Subsystems (3)
lore
Share & tools
lore

cchoux

author
#0 lore raw

PATCH 1/1 net/ncsi: clear Tx enable mode when handling a Config required AEN

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.

---
 net/ncsi/ncsi-aen.c | 1 +
 1 file changed, 1 insertion(+)
net/ncsi/ncsi-aen.c +1 -0
index b635c194f0a8..62fb1031763d 100644
@@ -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);
 }
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 6 lines · 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.

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).

Signature · 1 line
pw-bot: cr
author
#2 lore raw

PATCH v2 1/1 net/ncsi: clear Tx enable mode when handling a Config required AEN

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")
---
 net/ncsi/ncsi-aen.c | 1 +
 1 file changed, 1 insertion(+)
net/ncsi/ncsi-aen.c +1 -0
index b635c194f0a8..62fb1031763d 100644
@@ -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);
 }
Signature · 1 line
2.34.1
#3 lore raw
This patch was applied to netdev/net.git (main) by David S. Miller <[email protected]>:

Hello:

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

Quoted 10 lines · 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!

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