aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBreno Leitao <leitao@linux.vnet.ibm.com>2009-12-18 23:29:04 -0500
committerDavid S. Miller <davem@davemloft.net>2009-12-18 23:29:04 -0500
commit4529819c45161e4a119134f56ef504e69420bc98 (patch)
tree92b1cefb34ff9693a2c611c41986ce56bf0ace99 /drivers
parent3705e11a21bcdffe7422ee7870e1b23fe4ac70f4 (diff)
bnx2: reset_task is crashing the kernel. Fixing it.
If bnx2 schedules a reset via the reset_task, e.g., due to a TX timeout, it's possible for the NIC to be disabled with packets pending for transmit. In this case, napi_disable will loop forever, eventually crashing the kernel. This patch moves the disable of the device to after the napi_disable call. Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Acked-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/bnx2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 4bfc80812926..c3e2b279fca0 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -653,7 +653,6 @@ static void
653bnx2_netif_stop(struct bnx2 *bp) 653bnx2_netif_stop(struct bnx2 *bp)
654{ 654{
655 bnx2_cnic_stop(bp); 655 bnx2_cnic_stop(bp);
656 bnx2_disable_int_sync(bp);
657 if (netif_running(bp->dev)) { 656 if (netif_running(bp->dev)) {
658 bnx2_napi_disable(bp); 657 bnx2_napi_disable(bp);
659 netif_tx_disable(bp->dev); 658 netif_tx_disable(bp->dev);
@@ -672,6 +671,7 @@ bnx2_netif_start(struct bnx2 *bp)
672 bnx2_cnic_start(bp); 671 bnx2_cnic_start(bp);
673 } 672 }
674 } 673 }
674 bnx2_disable_int_sync(bp);
675} 675}
676 676
677static void 677static void