Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203647
b: refs/heads/master
c: 11848b9
h: refs/heads/master
i:
  203645: 366d2ec
  203643: 172e0ec
  203639: c1ea419
  203631: d698ba2
  203615: 656159f
  203583: 440d8e9
  203519: d7b61be
v: v3
  • Loading branch information
Michael Chan authored and David S. Miller committed Jul 20, 2010
1 parent 55b647a commit de843db
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: 379b39a2ad613745bfbfe80256957d19689b7b94
refs/heads/master: 11848b964777af9c68d9160582628c2eb11f46d5
10 changes: 9 additions & 1 deletion trunk/drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@ static inline u32 bnx2_tx_avail(struct bnx2 *bp, struct bnx2_tx_ring_info *txr)
{
u32 diff;

smp_mb();
/* Tell compiler to fetch tx_prod and tx_cons from memory. */
barrier();

/* The ring uses 256 indices for 255 entries, one of them
* needs to be skipped.
Expand Down Expand Up @@ -6534,6 +6535,13 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev)

if (unlikely(bnx2_tx_avail(bp, txr) <= MAX_SKB_FRAGS)) {
netif_tx_stop_queue(txq);

/* netif_tx_stop_queue() must be done before checking
* tx index in bnx2_tx_avail() below, because in
* bnx2_tx_int(), we update tx index before checking for
* netif_tx_queue_stopped().
*/
smp_mb();
if (bnx2_tx_avail(bp, txr) > bp->tx_wake_thresh)
netif_tx_wake_queue(txq);
}
Expand Down

0 comments on commit de843db

Please sign in to comment.