提交 7cde1c8b 编写于 作者: E Eilon Greenstein 提交者: David S. Miller

bnx2x: Calling napi_del

rmmod might hang without this patch since the reference counter is not going
down
Signed-off-by: NYitchak Gertner <gertner@broadcom.com>
Signed-off-by: NEilon Greenstein <eilong@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6eccabb3
...@@ -6547,6 +6547,8 @@ static int bnx2x_nic_load(struct bnx2x *bp, int load_mode) ...@@ -6547,6 +6547,8 @@ static int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
bnx2x_free_irq(bp); bnx2x_free_irq(bp);
load_error1: load_error1:
bnx2x_napi_disable(bp); bnx2x_napi_disable(bp);
for_each_queue(bp, i)
netif_napi_del(&bnx2x_fp(bp, i, napi));
bnx2x_free_mem(bp); bnx2x_free_mem(bp);
/* TBD we really need to reset the chip /* TBD we really need to reset the chip
...@@ -6855,6 +6857,8 @@ static int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode) ...@@ -6855,6 +6857,8 @@ static int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode)
bnx2x_free_skbs(bp); bnx2x_free_skbs(bp);
for_each_queue(bp, i) for_each_queue(bp, i)
bnx2x_free_rx_sge_range(bp, bp->fp + i, NUM_RX_SGE); bnx2x_free_rx_sge_range(bp, bp->fp + i, NUM_RX_SGE);
for_each_queue(bp, i)
netif_napi_del(&bnx2x_fp(bp, i, napi));
bnx2x_free_mem(bp); bnx2x_free_mem(bp);
bp->state = BNX2X_STATE_CLOSED; bp->state = BNX2X_STATE_CLOSED;
...@@ -10481,6 +10485,8 @@ static int bnx2x_eeh_nic_unload(struct bnx2x *bp) ...@@ -10481,6 +10485,8 @@ static int bnx2x_eeh_nic_unload(struct bnx2x *bp)
bnx2x_free_skbs(bp); bnx2x_free_skbs(bp);
for_each_queue(bp, i) for_each_queue(bp, i)
bnx2x_free_rx_sge_range(bp, bp->fp + i, NUM_RX_SGE); bnx2x_free_rx_sge_range(bp, bp->fp + i, NUM_RX_SGE);
for_each_queue(bp, i)
netif_napi_del(&bnx2x_fp(bp, i, napi));
bnx2x_free_mem(bp); bnx2x_free_mem(bp);
bp->state = BNX2X_STATE_CLOSED; bp->state = BNX2X_STATE_CLOSED;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册