From: Stanislaw Gruszka <sgruszka@redhat.com>
To: netdev@vger.kernel.org
Cc: Eilon Greenstein <eilong@broadcom.com>,
Vladislav Zolotarov <vladz@broadcom.com>,
Dmitry Kravkov <dmitry@broadcom.com>
Subject: [PATCH net-next] bnx2x: avoid TX timeout when stopping device
Date: Wed, 12 May 2010 11:09:21 +0200 [thread overview]
Message-ID: <20100512110921.0e3f45fc@dhcp-lab-109.englab.brq.redhat.com> (raw)
When stop device call netif_carrier_off() just after disabling TX queue to
avoid possibility of netdev watchdog warning and ->ndo_tx_timeout() invocation.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
drivers/net/bnx2x_main.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index 2bc35c7..57ff5b3 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -8499,6 +8499,7 @@ static int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode)
/* Disable HW interrupts, NAPI and Tx */
bnx2x_netif_stop(bp, 1);
+ netif_carrier_off(bp->dev);
del_timer_sync(&bp->timer);
SHMEM_WR(bp, func_mb[BP_FUNC(bp)].drv_pulse_mb,
@@ -8524,8 +8525,6 @@ static int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode)
bp->state = BNX2X_STATE_CLOSED;
- netif_carrier_off(bp->dev);
-
/* The last driver must disable a "close the gate" if there is no
* parity attention or "process kill" pending.
*/
@@ -13431,6 +13430,7 @@ static int bnx2x_eeh_nic_unload(struct bnx2x *bp)
bp->rx_mode = BNX2X_RX_MODE_NONE;
bnx2x_netif_stop(bp, 0);
+ netif_carrier_off(bp->dev);
del_timer_sync(&bp->timer);
bp->stats_state = STATS_STATE_DISABLED;
@@ -13457,8 +13457,6 @@ static int bnx2x_eeh_nic_unload(struct bnx2x *bp)
bp->state = BNX2X_STATE_CLOSED;
- netif_carrier_off(bp->dev);
-
return 0;
}
--
1.5.5.6
next reply other threads:[~2010-05-12 9:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-12 9:09 Stanislaw Gruszka [this message]
2010-05-12 9:27 ` [PATCH net-next] bnx2x: avoid TX timeout when stopping device Eric Dumazet
2010-05-12 10:58 ` Stanislaw Gruszka
2010-05-12 11:06 ` [RFC PATCH] bnx2: use netif_carrier_off to prevent tx timeout Stanislaw Gruszka
2010-05-12 11:16 ` [RFC PATCH] tg3: " Stanislaw Gruszka
2010-05-12 13:31 ` [RFC PATCH] bnx2: " Michael Chan
2010-05-12 14:00 ` Stanislaw Gruszka
2010-05-12 14:09 ` Michael Chan
2010-05-12 11:19 ` [PATCH net-next] bnx2x: avoid TX timeout when stopping device Eilon Greenstein
2010-05-12 12:37 ` Eric Dumazet
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=20100512110921.0e3f45fc@dhcp-lab-109.englab.brq.redhat.com \
--to=sgruszka@redhat.com \
--cc=dmitry@broadcom.com \
--cc=eilong@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=vladz@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).