diff options
author | Cosmo Chou <chou.cosmo@gmail.com> | 2023-04-26 16:13:50 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-05-17 11:53:32 +0200 |
commit | 449280afaa053f74678c9dce4e9db723e1f84a32 (patch) | |
tree | db0295fb281f00689b4111f43dcdd29d228889cf | |
parent | a78b922d118066457093a414abf39f02657841d9 (diff) | |
download | linux-stable-449280afaa053f74678c9dce4e9db723e1f84a32.tar.gz linux-stable-449280afaa053f74678c9dce4e9db723e1f84a32.tar.bz2 linux-stable-449280afaa053f74678c9dce4e9db723e1f84a32.zip |
net/ncsi: clear Tx enable mode when handling a Config required AEN
[ Upstream commit 6f75cd166a5a3c0bc50441faa8b8304f60522fdd ]
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | net/ncsi/ncsi-aen.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); } |