aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ixgb')
-rw-r--r--drivers/net/ixgb/ixgb_main.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index 41f3adf5f375..04cac41f7d5e 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -1855,12 +1855,17 @@ ixgb_clean_tx_irq(struct ixgb_adapter *adapter)
1855 1855
1856 tx_ring->next_to_clean = i; 1856 tx_ring->next_to_clean = i;
1857 1857
1858 if (unlikely(netif_queue_stopped(netdev))) { 1858 if (unlikely(cleaned && netif_carrier_ok(netdev) &&
1859 spin_lock(&adapter->tx_lock); 1859 IXGB_DESC_UNUSED(tx_ring) >= DESC_NEEDED)) {
1860 if (netif_queue_stopped(netdev) && netif_carrier_ok(netdev) && 1860 /* Make sure that anybody stopping the queue after this
1861 (IXGB_DESC_UNUSED(tx_ring) >= DESC_NEEDED)) 1861 * sees the new next_to_clean. */
1862 smp_mb();
1863
1864 if (netif_queue_stopped(netdev) &&
1865 !(test_bit(__IXGB_DOWN, &adapter->flags))) {
1862 netif_wake_queue(netdev); 1866 netif_wake_queue(netdev);
1863 spin_unlock(&adapter->tx_lock); 1867 ++adapter->restart_queue;
1868 }
1864 } 1869 }
1865 1870
1866 if(adapter->detect_tx_hung) { 1871 if(adapter->detect_tx_hung) {