diff options
author | Eilon Greenstein <eilong@broadcom.com> | 2009-01-22 01:01:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-22 16:47:11 -0500 |
commit | 7cde1c8b79f913a0158bae4f4c612de2cb98e7e4 (patch) | |
tree | e280fa10b43723fe9cd8e0872264cdc6e9d6a974 /drivers/net/bnx2x_main.c | |
parent | 6eccabb301d442e6106ecc84b07a976c2816d9fb (diff) |
bnx2x: Calling napi_del
rmmod might hang without this patch since the reference counter is not going
down
Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-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.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index fbd71659cca6..71fbf2dbda3b 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c | |||
@@ -6547,6 +6547,8 @@ load_error2: | |||
6547 | bnx2x_free_irq(bp); | 6547 | bnx2x_free_irq(bp); |
6548 | load_error1: | 6548 | load_error1: |
6549 | bnx2x_napi_disable(bp); | 6549 | bnx2x_napi_disable(bp); |
6550 | for_each_queue(bp, i) | ||
6551 | netif_napi_del(&bnx2x_fp(bp, i, napi)); | ||
6550 | bnx2x_free_mem(bp); | 6552 | bnx2x_free_mem(bp); |
6551 | 6553 | ||
6552 | /* TBD we really need to reset the chip | 6554 | /* TBD we really need to reset the chip |
@@ -6855,6 +6857,8 @@ unload_error: | |||
6855 | bnx2x_free_skbs(bp); | 6857 | bnx2x_free_skbs(bp); |
6856 | for_each_queue(bp, i) | 6858 | for_each_queue(bp, i) |
6857 | bnx2x_free_rx_sge_range(bp, bp->fp + i, NUM_RX_SGE); | 6859 | bnx2x_free_rx_sge_range(bp, bp->fp + i, NUM_RX_SGE); |
6860 | for_each_queue(bp, i) | ||
6861 | netif_napi_del(&bnx2x_fp(bp, i, napi)); | ||
6858 | bnx2x_free_mem(bp); | 6862 | bnx2x_free_mem(bp); |
6859 | 6863 | ||
6860 | bp->state = BNX2X_STATE_CLOSED; | 6864 | bp->state = BNX2X_STATE_CLOSED; |
@@ -10481,6 +10485,8 @@ static int bnx2x_eeh_nic_unload(struct bnx2x *bp) | |||
10481 | bnx2x_free_skbs(bp); | 10485 | bnx2x_free_skbs(bp); |
10482 | for_each_queue(bp, i) | 10486 | for_each_queue(bp, i) |
10483 | bnx2x_free_rx_sge_range(bp, bp->fp + i, NUM_RX_SGE); | 10487 | bnx2x_free_rx_sge_range(bp, bp->fp + i, NUM_RX_SGE); |
10488 | for_each_queue(bp, i) | ||
10489 | netif_napi_del(&bnx2x_fp(bp, i, napi)); | ||
10484 | bnx2x_free_mem(bp); | 10490 | bnx2x_free_mem(bp); |
10485 | 10491 | ||
10486 | bp->state = BNX2X_STATE_CLOSED; | 10492 | bp->state = BNX2X_STATE_CLOSED; |