diff options
Diffstat (limited to 'drivers/net/e1000')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 1d08e937af82..b28a915bd980 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -3796,7 +3796,7 @@ e1000_intr_msi(int irq, void *data) | |||
3796 | 3796 | ||
3797 | for (i = 0; i < E1000_MAX_INTR; i++) | 3797 | for (i = 0; i < E1000_MAX_INTR; i++) |
3798 | if (unlikely(!adapter->clean_rx(adapter, adapter->rx_ring) & | 3798 | if (unlikely(!adapter->clean_rx(adapter, adapter->rx_ring) & |
3799 | e1000_clean_tx_irq(adapter, adapter->tx_ring))) | 3799 | !e1000_clean_tx_irq(adapter, adapter->tx_ring))) |
3800 | break; | 3800 | break; |
3801 | 3801 | ||
3802 | if (likely(adapter->itr_setting & 3)) | 3802 | if (likely(adapter->itr_setting & 3)) |
@@ -3899,7 +3899,7 @@ e1000_intr(int irq, void *data) | |||
3899 | 3899 | ||
3900 | for (i = 0; i < E1000_MAX_INTR; i++) | 3900 | for (i = 0; i < E1000_MAX_INTR; i++) |
3901 | if (unlikely(!adapter->clean_rx(adapter, adapter->rx_ring) & | 3901 | if (unlikely(!adapter->clean_rx(adapter, adapter->rx_ring) & |
3902 | e1000_clean_tx_irq(adapter, adapter->tx_ring))) | 3902 | !e1000_clean_tx_irq(adapter, adapter->tx_ring))) |
3903 | break; | 3903 | break; |
3904 | 3904 | ||
3905 | if (likely(adapter->itr_setting & 3)) | 3905 | if (likely(adapter->itr_setting & 3)) |
@@ -3949,7 +3949,7 @@ e1000_clean(struct net_device *poll_dev, int *budget) | |||
3949 | poll_dev->quota -= work_done; | 3949 | poll_dev->quota -= work_done; |
3950 | 3950 | ||
3951 | /* If no Tx and not enough Rx work done, exit the polling mode */ | 3951 | /* If no Tx and not enough Rx work done, exit the polling mode */ |
3952 | if ((tx_cleaned && (work_done < work_to_do)) || | 3952 | if ((!tx_cleaned && (work_done == 0)) || |
3953 | !netif_running(poll_dev)) { | 3953 | !netif_running(poll_dev)) { |
3954 | quit_polling: | 3954 | quit_polling: |
3955 | if (likely(adapter->itr_setting & 3)) | 3955 | if (likely(adapter->itr_setting & 3)) |
@@ -3979,7 +3979,7 @@ e1000_clean_tx_irq(struct e1000_adapter *adapter, | |||
3979 | #ifdef CONFIG_E1000_NAPI | 3979 | #ifdef CONFIG_E1000_NAPI |
3980 | unsigned int count = 0; | 3980 | unsigned int count = 0; |
3981 | #endif | 3981 | #endif |
3982 | boolean_t cleaned = TRUE; | 3982 | boolean_t cleaned = FALSE; |
3983 | unsigned int total_tx_bytes=0, total_tx_packets=0; | 3983 | unsigned int total_tx_bytes=0, total_tx_packets=0; |
3984 | 3984 | ||
3985 | i = tx_ring->next_to_clean; | 3985 | i = tx_ring->next_to_clean; |
@@ -4013,10 +4013,7 @@ e1000_clean_tx_irq(struct e1000_adapter *adapter, | |||
4013 | #ifdef CONFIG_E1000_NAPI | 4013 | #ifdef CONFIG_E1000_NAPI |
4014 | #define E1000_TX_WEIGHT 64 | 4014 | #define E1000_TX_WEIGHT 64 |
4015 | /* weight of a sort for tx, to avoid endless transmit cleanup */ | 4015 | /* weight of a sort for tx, to avoid endless transmit cleanup */ |
4016 | if (count++ == E1000_TX_WEIGHT) { | 4016 | if (count++ == E1000_TX_WEIGHT) break; |
4017 | cleaned = FALSE; | ||
4018 | break; | ||
4019 | } | ||
4020 | #endif | 4017 | #endif |
4021 | } | 4018 | } |
4022 | 4019 | ||