diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index f604a1dea399..3c37c40339fb 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -3400,13 +3400,15 @@ e1000_clean_tx_irq(struct e1000_adapter *adapter, | |||
3400 | 3400 | ||
3401 | tx_ring->next_to_clean = i; | 3401 | tx_ring->next_to_clean = i; |
3402 | 3402 | ||
3403 | spin_lock(&tx_ring->tx_lock); | 3403 | #define TX_WAKE_THRESHOLD 32 |
3404 | |||
3405 | if (unlikely(cleaned && netif_queue_stopped(netdev) && | 3404 | if (unlikely(cleaned && netif_queue_stopped(netdev) && |
3406 | netif_carrier_ok(netdev))) | 3405 | netif_carrier_ok(netdev))) { |
3407 | netif_wake_queue(netdev); | 3406 | spin_lock(&tx_ring->tx_lock); |
3408 | 3407 | if (netif_queue_stopped(netdev) && | |
3409 | spin_unlock(&tx_ring->tx_lock); | 3408 | (E1000_DESC_UNUSED(tx_ring) >= TX_WAKE_THRESHOLD)) |
3409 | netif_wake_queue(netdev); | ||
3410 | spin_unlock(&tx_ring->tx_lock); | ||
3411 | } | ||
3410 | 3412 | ||
3411 | if (adapter->detect_tx_hung) { | 3413 | if (adapter->detect_tx_hung) { |
3412 | /* Detect a transmit hang in hardware, this serializes the | 3414 | /* Detect a transmit hang in hardware, this serializes the |