]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
bnx2x: First slow path interrupt race
authorEilon Greenstein <eilong@broadcom.com>
Thu, 15 Jan 2009 05:31:08 +0000 (21:31 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Jan 2009 16:28:17 +0000 (08:28 -0800)
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

index b573951600de742bfd637a0b6af9d2a90e574805..7c533797c064aceb12132306eb862d44ebf8c000 100644 (file)
@@ -4812,6 +4812,15 @@ static void bnx2x_nic_init(struct bnx2x *bp, u32 load_code)
        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);
 }
 
@@ -6420,17 +6429,8 @@ static int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
                }
        }
 
-       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");