diff options
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r-- | drivers/net/bnx2.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index d44ecc30865f..2af570d7a2fb 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -253,7 +253,8 @@ static inline u32 bnx2_tx_avail(struct bnx2 *bp, struct bnx2_tx_ring_info *txr) | |||
253 | { | 253 | { |
254 | u32 diff; | 254 | u32 diff; |
255 | 255 | ||
256 | smp_mb(); | 256 | /* Tell compiler to fetch tx_prod and tx_cons from memory. */ |
257 | barrier(); | ||
257 | 258 | ||
258 | /* The ring uses 256 indices for 255 entries, one of them | 259 | /* The ring uses 256 indices for 255 entries, one of them |
259 | * needs to be skipped. | 260 | * needs to be skipped. |
@@ -6534,6 +6535,13 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
6534 | 6535 | ||
6535 | if (unlikely(bnx2_tx_avail(bp, txr) <= MAX_SKB_FRAGS)) { | 6536 | if (unlikely(bnx2_tx_avail(bp, txr) <= MAX_SKB_FRAGS)) { |
6536 | netif_tx_stop_queue(txq); | 6537 | netif_tx_stop_queue(txq); |
6538 | |||
6539 | /* netif_tx_stop_queue() must be done before checking | ||
6540 | * tx index in bnx2_tx_avail() below, because in | ||
6541 | * bnx2_tx_int(), we update tx index before checking for | ||
6542 | * netif_tx_queue_stopped(). | ||
6543 | */ | ||
6544 | smp_mb(); | ||
6537 | if (bnx2_tx_avail(bp, txr) > bp->tx_wake_thresh) | 6545 | if (bnx2_tx_avail(bp, txr) > bp->tx_wake_thresh) |
6538 | netif_tx_wake_queue(txq); | 6546 | netif_tx_wake_queue(txq); |
6539 | } | 6547 | } |