From: Benjamin Poirier <bpoirier@suse.com>
To: David Miller <davem@davemloft.net>
Cc: Sathya Perla <sathya.perla@broadcom.com>,
Ajit Khaparde <ajit.khaparde@broadcom.com>,
Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>,
Somnath Kotur <somnath.kotur@broadcom.com>,
Firo Yang <fyang@suse.com>, Saeed Mahameed <saeedm@mellanox.com>,
netdev@vger.kernel.org
Subject: [PATCH net] be2net: Signal that the device cannot transmit during reconfiguration
Date: Tue, 16 Jul 2019 17:16:55 +0900 [thread overview]
Message-ID: <20190716081655.7676-1-bpoirier@suse.com> (raw)
While changing the number of interrupt channels, be2net stops adapter
operation (including netif_tx_disable()) but it doesn't signal that it
cannot transmit. This may lead dev_watchdog() to falsely trigger during
that time.
Add the missing call to netif_carrier_off(), following the pattern used in
many other drivers. netif_carrier_on() is already taken care of in
be_open().
Signed-off-by: Benjamin Poirier <bpoirier@suse.com>
---
drivers/net/ethernet/emulex/benet/be_main.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 82015c8a5ed7..b7a246b33599 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -4697,8 +4697,12 @@ int be_update_queues(struct be_adapter *adapter)
struct net_device *netdev = adapter->netdev;
int status;
- if (netif_running(netdev))
+ if (netif_running(netdev)) {
+ /* device cannot transmit now, avoid dev_watchdog timeouts */
+ netif_carrier_off(netdev);
+
be_close(netdev);
+ }
be_cancel_worker(adapter);
--
2.22.0
next reply other threads:[~2019-07-16 8:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-16 8:16 Benjamin Poirier [this message]
2019-07-16 19:41 ` [PATCH net] be2net: Signal that the device cannot transmit during reconfiguration David Miller
2019-07-17 4:23 ` Firo Yang
2019-07-17 8:23 ` Benjamin Poirier
2019-07-17 8:56 ` Firo Yang
2019-07-17 9:32 ` Benjamin Poirier
2019-07-17 10:25 ` Firo Yang
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=20190716081655.7676-1-bpoirier@suse.com \
--to=bpoirier@suse.com \
--cc=ajit.khaparde@broadcom.com \
--cc=davem@davemloft.net \
--cc=fyang@suse.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@mellanox.com \
--cc=sathya.perla@broadcom.com \
--cc=somnath.kotur@broadcom.com \
--cc=sriharsha.basavapatna@broadcom.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;
as well as URLs for NNTP newsgroup(s).