diff options
Diffstat (limited to 'drivers/net/bnx2x_main.c')
-rw-r--r-- | drivers/net/bnx2x_main.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index ed785a30e98b..6c042a72d6cc 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c | |||
@@ -893,7 +893,6 @@ static inline u16 bnx2x_tx_avail(struct bnx2x_fastpath *fp) | |||
893 | u16 prod; | 893 | u16 prod; |
894 | u16 cons; | 894 | u16 cons; |
895 | 895 | ||
896 | barrier(); /* Tell compiler that prod and cons can change */ | ||
897 | prod = fp->tx_bd_prod; | 896 | prod = fp->tx_bd_prod; |
898 | cons = fp->tx_bd_cons; | 897 | cons = fp->tx_bd_cons; |
899 | 898 | ||
@@ -963,7 +962,7 @@ static int bnx2x_tx_int(struct bnx2x_fastpath *fp) | |||
963 | * start_xmit() will miss it and cause the queue to be stopped | 962 | * start_xmit() will miss it and cause the queue to be stopped |
964 | * forever. | 963 | * forever. |
965 | */ | 964 | */ |
966 | smp_wmb(); | 965 | smp_mb(); |
967 | 966 | ||
968 | /* TBD need a thresh? */ | 967 | /* TBD need a thresh? */ |
969 | if (unlikely(netif_tx_queue_stopped(txq))) { | 968 | if (unlikely(netif_tx_queue_stopped(txq))) { |
@@ -11429,9 +11428,12 @@ static netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
11429 | 11428 | ||
11430 | if (unlikely(bnx2x_tx_avail(fp) < MAX_SKB_FRAGS + 3)) { | 11429 | if (unlikely(bnx2x_tx_avail(fp) < MAX_SKB_FRAGS + 3)) { |
11431 | netif_tx_stop_queue(txq); | 11430 | netif_tx_stop_queue(txq); |
11432 | /* We want bnx2x_tx_int to "see" the updated tx_bd_prod | 11431 | |
11433 | if we put Tx into XOFF state. */ | 11432 | /* paired memory barrier is in bnx2x_tx_int(), we have to keep |
11433 | * ordering of set_bit() in netif_tx_stop_queue() and read of | ||
11434 | * fp->bd_tx_cons */ | ||
11434 | smp_mb(); | 11435 | smp_mb(); |
11436 | |||
11435 | fp->eth_q_stats.driver_xoff++; | 11437 | fp->eth_q_stats.driver_xoff++; |
11436 | if (bnx2x_tx_avail(fp) >= MAX_SKB_FRAGS + 3) | 11438 | if (bnx2x_tx_avail(fp) >= MAX_SKB_FRAGS + 3) |
11437 | netif_tx_wake_queue(txq); | 11439 | netif_tx_wake_queue(txq); |