提交 4529819c 编写于 作者: B Breno Leitao 提交者: David S. Miller

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: NBreno Leitao <leitao@linux.vnet.ibm.com>
Acked-by: NMichael Chan <mchan@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 3705e11a
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册