Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159015
b: refs/heads/master
c: e151070
h: refs/heads/master
i:
  159013: 95c17e7
  159011: b1f5979
  159007: 0fbb73e
v: v3
  • Loading branch information
Eilon Greenstein authored and David S. Miller committed Jul 21, 2009
1 parent 736292f commit 363cce3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 37dbbf32a0d45f0ed88f92cb6d0c35f4809e3a8e
refs/heads/master: e15107065d073714dc47cf6b80c8bf5eea1bf18b
10 changes: 9 additions & 1 deletion trunk/drivers/net/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,8 @@ static void bnx2x_int_disable_sync(struct bnx2x *bp, int disable_hw)

/* disable interrupt handling */
atomic_inc(&bp->intr_sem);
smp_wmb(); /* Ensure that bp->intr_sem update is SMP-safe */

if (disable_hw)
/* prevent the HW from sending interrupts */
bnx2x_int_disable(bp);
Expand Down Expand Up @@ -6642,7 +6644,12 @@ static void bnx2x_napi_disable(struct bnx2x *bp)

static void bnx2x_netif_start(struct bnx2x *bp)
{
if (atomic_dec_and_test(&bp->intr_sem)) {
int intr_sem;

intr_sem = atomic_dec_and_test(&bp->intr_sem);
smp_wmb(); /* Ensure that bp->intr_sem update is SMP-safe */

if (intr_sem) {
if (netif_running(bp->dev)) {
bnx2x_napi_enable(bp);
bnx2x_int_enable(bp);
Expand Down Expand Up @@ -8229,6 +8236,7 @@ static int __devinit bnx2x_init_bp(struct bnx2x *bp)

/* Disable interrupt handling until HW is initialized */
atomic_set(&bp->intr_sem, 1);
smp_wmb(); /* Ensure that bp->intr_sem update is SMP-safe */

mutex_init(&bp->port.phy_mutex);

Expand Down

0 comments on commit 363cce3

Please sign in to comment.