Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135013
b: refs/heads/master
c: 6044735
h: refs/heads/master
i:
  135011: 12a8235
v: v3
  • Loading branch information
Eilon Greenstein authored and David S. Miller committed Mar 3, 2009
1 parent 838a545 commit 9799f91
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 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: 0d1a8d2d7dd9f6588ed9544a9aa88fd9bd9467d3
refs/heads/master: 6044735d8ddd96bf23cf975bae8729c65479aa14
15 changes: 8 additions & 7 deletions trunk/drivers/net/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,18 +916,19 @@ static void bnx2x_tx_int(struct bnx2x_fastpath *fp, int work)
fp->tx_pkt_cons = sw_cons;
fp->tx_bd_cons = bd_cons;

/* Need to make the tx_bd_cons update visible to start_xmit()
* before checking for netif_tx_queue_stopped(). Without the
* memory barrier, there is a small possibility that start_xmit()
* will miss it and cause the queue to be stopped forever.
*/
smp_mb();

/* TBD need a thresh? */
if (unlikely(netif_tx_queue_stopped(txq))) {

__netif_tx_lock(txq, smp_processor_id());

/* Need to make the tx_bd_cons update visible to start_xmit()
* before checking for netif_tx_queue_stopped(). Without the
* memory barrier, there is a small possibility that
* start_xmit() will miss it and cause the queue to be stopped
* forever.
*/
smp_mb();

if ((netif_tx_queue_stopped(txq)) &&
(bp->state == BNX2X_STATE_OPEN) &&
(bnx2x_tx_avail(fp) >= MAX_SKB_FRAGS + 3))
Expand Down

0 comments on commit 9799f91

Please sign in to comment.