]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/patches/suse-2.6.27.31/patches.drivers/bnx2x-First-slow-path-interrupt-race.patch
Move xen patchset to new version's subdir.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.drivers / bnx2x-First-slow-path-interrupt-race.patch
diff --git a/src/patches/suse-2.6.27.31/patches.drivers/bnx2x-First-slow-path-interrupt-race.patch b/src/patches/suse-2.6.27.31/patches.drivers/bnx2x-First-slow-path-interrupt-race.patch
new file mode 100644 (file)
index 0000000..5201a7a
--- /dev/null
@@ -0,0 +1,54 @@
+From 0ef00459a638ae4f5d1e5326d3e50232fa80119f Mon Sep 17 00:00:00 2001
+From: Eilon Greenstein <eilong@broadcom.com>
+Date: Wed, 14 Jan 2009 21:31:08 -0800
+Subject: bnx2x: First slow path interrupt race
+Acked-by: Karsten Keil <kkeil@novell.com>
+Reference: bnc#472500
+
+The "read for interrupts" flag must be set before enabling slow-path
+interrupts as well (and not just before fast-path interrupts)
+
+Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ drivers/net/bnx2x_main.c |   18 +++++++++---------
+ 1 files changed, 9 insertions(+), 9 deletions(-)
+
+Index: linux-2.6.27-bnx2x_2/drivers/net/bnx2x_main.c
+===================================================================
+--- linux-2.6.27-bnx2x_2.orig/drivers/net/bnx2x_main.c
++++ linux-2.6.27-bnx2x_2/drivers/net/bnx2x_main.c
+@@ -4815,6 +4815,15 @@ static void bnx2x_nic_init(struct bnx2x 
+       bnx2x_init_context(bp);
+       bnx2x_init_internal(bp, load_code);
+       bnx2x_init_ind_table(bp);
++      bnx2x_stats_init(bp);
++
++      /* At this point, we are ready for interrupts */
++      atomic_set(&bp->intr_sem, 0);
++
++      /* flush all before enabling interrupts */
++      mb();
++      mmiowb();
++
+       bnx2x_int_enable(bp);
+ }
+@@ -6423,17 +6432,8 @@ static int bnx2x_nic_load(struct bnx2x *
+               }
+       }
+-      bnx2x_stats_init(bp);
+-
+       bp->state = BNX2X_STATE_OPENING_WAIT4_PORT;
+-      /* Enable Rx interrupt handling before sending the ramrod
+-         as it's completed on Rx FP queue */
+-      bnx2x_napi_enable(bp);
+-
+-      /* Enable interrupt handling */
+-      atomic_set(&bp->intr_sem, 0);
+-
+       rc = bnx2x_setup_leading(bp);
+       if (rc) {
+               BNX2X_ERR("Setup leading failed!\n");