From 4529819c45161e4a119134f56ef504e69420bc98 Mon Sep 17 00:00:00 2001 From: Breno Leitao Date: Fri, 18 Dec 2009 20:29:04 -0800 Subject: [PATCH] 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 Acked-by: Michael Chan Signed-off-by: David S. Miller --- drivers/net/bnx2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 4bfc808..c3e2b27 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -653,7 +653,6 @@ static void bnx2_netif_stop(struct bnx2 *bp) { bnx2_cnic_stop(bp); - bnx2_disable_int_sync(bp); if (netif_running(bp->dev)) { bnx2_napi_disable(bp); netif_tx_disable(bp->dev); @@ -672,6 +671,7 @@ bnx2_netif_start(struct bnx2 *bp) bnx2_cnic_start(bp); } } + bnx2_disable_int_sync(bp); } static void -- 2.7.4