diff options
Diffstat (limited to 'drivers/net/bnx2x_main.c')
-rw-r--r-- | drivers/net/bnx2x_main.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index 5954bed60652..fbd0f88fc81b 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c | |||
@@ -916,18 +916,19 @@ static void bnx2x_tx_int(struct bnx2x_fastpath *fp, int work) | |||
916 | fp->tx_pkt_cons = sw_cons; | 916 | fp->tx_pkt_cons = sw_cons; |
917 | fp->tx_bd_cons = bd_cons; | 917 | fp->tx_bd_cons = bd_cons; |
918 | 918 | ||
919 | /* Need to make the tx_bd_cons update visible to start_xmit() | ||
920 | * before checking for netif_tx_queue_stopped(). Without the | ||
921 | * memory barrier, there is a small possibility that start_xmit() | ||
922 | * will miss it and cause the queue to be stopped forever. | ||
923 | */ | ||
924 | smp_mb(); | ||
925 | |||
926 | /* TBD need a thresh? */ | 919 | /* TBD need a thresh? */ |
927 | if (unlikely(netif_tx_queue_stopped(txq))) { | 920 | if (unlikely(netif_tx_queue_stopped(txq))) { |
928 | 921 | ||
929 | __netif_tx_lock(txq, smp_processor_id()); | 922 | __netif_tx_lock(txq, smp_processor_id()); |
930 | 923 | ||
924 | /* Need to make the tx_bd_cons update visible to start_xmit() | ||
925 | * before checking for netif_tx_queue_stopped(). Without the | ||
926 | * memory barrier, there is a small possibility that | ||
927 | * start_xmit() will miss it and cause the queue to be stopped | ||
928 | * forever. | ||
929 | */ | ||
930 | smp_mb(); | ||
931 | |||
931 | if ((netif_tx_queue_stopped(txq)) && | 932 | if ((netif_tx_queue_stopped(txq)) && |
932 | (bp->state == BNX2X_STATE_OPEN) && | 933 | (bp->state == BNX2X_STATE_OPEN) && |
933 | (bnx2x_tx_avail(fp) >= MAX_SKB_FRAGS + 3)) | 934 | (bnx2x_tx_avail(fp) >= MAX_SKB_FRAGS + 3)) |