aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x_main.c
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2010-05-17 20:35:38 -0400
committerDavid S. Miller <davem@davemloft.net>2010-05-17 20:35:38 -0400
commitc89af1a30870e04986e2c8d24c0c765de0935f4b (patch)
tree63c89530aa434fbfb384c5eb37529fe9920992ed /drivers/net/bnx2x_main.c
parenta0ba676008d9f050f1de9ede8d1ee4bf6820bfc9 (diff)
bnx2x: avoid TX timeout when stopping device
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> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x_main.c')
-rw-r--r--drivers/net/bnx2x_main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index 2bc35c794aec..57ff5b3bcce6 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)
8499 8499
8500 /* Disable HW interrupts, NAPI and Tx */ 8500 /* Disable HW interrupts, NAPI and Tx */
8501 bnx2x_netif_stop(bp, 1); 8501 bnx2x_netif_stop(bp, 1);
8502 netif_carrier_off(bp->dev);
8502 8503
8503 del_timer_sync(&bp->timer); 8504 del_timer_sync(&bp->timer);
8504 SHMEM_WR(bp, func_mb[BP_FUNC(bp)].drv_pulse_mb, 8505 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)
8524 8525
8525 bp->state = BNX2X_STATE_CLOSED; 8526 bp->state = BNX2X_STATE_CLOSED;
8526 8527
8527 netif_carrier_off(bp->dev);
8528
8529 /* The last driver must disable a "close the gate" if there is no 8528 /* The last driver must disable a "close the gate" if there is no
8530 * parity attention or "process kill" pending. 8529 * parity attention or "process kill" pending.
8531 */ 8530 */
@@ -13431,6 +13430,7 @@ static int bnx2x_eeh_nic_unload(struct bnx2x *bp)
13431 bp->rx_mode = BNX2X_RX_MODE_NONE; 13430 bp->rx_mode = BNX2X_RX_MODE_NONE;
13432 13431
13433 bnx2x_netif_stop(bp, 0); 13432 bnx2x_netif_stop(bp, 0);
13433 netif_carrier_off(bp->dev);
13434 13434
13435 del_timer_sync(&bp->timer); 13435 del_timer_sync(&bp->timer);
13436 bp->stats_state = STATS_STATE_DISABLED; 13436 bp->stats_state = STATS_STATE_DISABLED;
@@ -13457,8 +13457,6 @@ static int bnx2x_eeh_nic_unload(struct bnx2x *bp)
13457 13457
13458 bp->state = BNX2X_STATE_CLOSED; 13458 bp->state = BNX2X_STATE_CLOSED;
13459 13459
13460 netif_carrier_off(bp->dev);
13461
13462 return 0; 13460 return 0;
13463} 13461}
13464 13462