Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262453
b: refs/heads/master
c: 87b7ba3
h: refs/heads/master
i:
  262451: e535835
v: v3
  • Loading branch information
Vladislav Zolotarov authored and David S. Miller committed Aug 2, 2011
1 parent 8eef94e commit a6c56cc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 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: 22019b17821ab3543090827491e465c5816cbcd6
refs/heads/master: 87b7ba3d24a25cf18aece447de27d7804fa9668c
10 changes: 8 additions & 2 deletions trunk/drivers/net/bnx2x/bnx2x_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1989,14 +1989,20 @@ int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode)
return -EINVAL;
}

/*
* It's important to set the bp->state to the value different from
* BNX2X_STATE_OPEN and only then stop the Tx. Otherwise bnx2x_tx_int()
* may restart the Tx from the NAPI context (see bnx2x_tx_int()).
*/
bp->state = BNX2X_STATE_CLOSING_WAIT4_HALT;
smp_mb();

/* Stop Tx */
bnx2x_tx_disable(bp);

#ifdef BCM_CNIC
bnx2x_cnic_notify(bp, CNIC_CTL_STOP_CMD);
#endif
bp->state = BNX2X_STATE_CLOSING_WAIT4_HALT;
smp_mb();

bp->rx_mode = BNX2X_RX_MODE_NONE;

Expand Down

0 comments on commit a6c56cc

Please sign in to comment.