From: Cosmo Chou <chou.cosmo@gmail.com>
To: kuba@kernel.org, davem@davemloft.net, edumazet@google.com,
pabeni@redhat.com, sam@mendozajonas.com
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
chou.cosmo@gmail.com, cosmo.chou@quantatw.com
Subject: [PATCH v2] net/ncsi: clear Tx enable mode when handling a Config required AEN
Date: Wed, 26 Apr 2023 16:13:50 +0800 [thread overview]
Message-ID: <20230426081350.1214512-1-chou.cosmo@gmail.com> (raw)
In-Reply-To: <20230425083842.65873403@kernel.org>
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
next prev parent reply other threads:[~2023-04-26 8:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Cosmo Chou [this message]
2023-04-28 8:40 ` [PATCH v2] " patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230426081350.1214512-1-chou.cosmo@gmail.com \
--to=chou.cosmo@gmail.com \
--cc=cosmo.chou@quantatw.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sam@mendozajonas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox