]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.drivers/bnx2x-Calling-napi_del.patch
Fix oinkmaster patch.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.drivers / bnx2x-Calling-napi_del.patch
CommitLineData
2cb7cef9
BS
1From 7cde1c8b79f913a0158bae4f4c612de2cb98e7e4 Mon Sep 17 00:00:00 2001
2From: Eilon Greenstein <eilong@broadcom.com>
3Date: Thu, 22 Jan 2009 06:01:25 +0000
4Subject: bnx2x: Calling napi_del
5Acked-by: Karsten Keil <kkeil@novell.com>
6Reference: bnc#472500
7
8rmmod might hang without this patch since the reference counter is not going
9down
10
11Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
12Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
13Signed-off-by: David S. Miller <davem@davemloft.net>
14---
15 drivers/net/bnx2x_main.c | 6 ++++++
16 1 files changed, 6 insertions(+), 0 deletions(-)
17
18Index: linux-2.6.27-bnx2x_2/drivers/net/bnx2x_main.c
19===================================================================
20--- linux-2.6.27-bnx2x_2.orig/drivers/net/bnx2x_main.c
21+++ linux-2.6.27-bnx2x_2/drivers/net/bnx2x_main.c
22@@ -6550,6 +6550,8 @@ load_error2:
23 bnx2x_free_irq(bp);
24 load_error1:
25 bnx2x_napi_disable(bp);
26+ for_each_queue(bp, i)
27+ netif_napi_del(&bnx2x_fp(bp, i, napi));
28 bnx2x_free_mem(bp);
29
30 /* TBD we really need to reset the chip
31@@ -6858,6 +6860,8 @@ unload_error:
32 bnx2x_free_skbs(bp);
33 for_each_queue(bp, i)
34 bnx2x_free_rx_sge_range(bp, bp->fp + i, NUM_RX_SGE);
35+ for_each_queue(bp, i)
36+ netif_napi_del(&bnx2x_fp(bp, i, napi));
37 bnx2x_free_mem(bp);
38
39 bp->state = BNX2X_STATE_CLOSED;
40@@ -10484,6 +10488,8 @@ static int bnx2x_eeh_nic_unload(struct b
41 bnx2x_free_skbs(bp);
42 for_each_queue(bp, i)
43 bnx2x_free_rx_sge_range(bp, bp->fp + i, NUM_RX_SGE);
44+ for_each_queue(bp, i)
45+ netif_napi_del(&bnx2x_fp(bp, i, napi));
46 bnx2x_free_mem(bp);
47
48 bp->state = BNX2X_STATE_CLOSED;