aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/e1000/e1000_main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 58561a4955e3..e80378a220d4 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -3349,6 +3349,9 @@ e1000_clean_tx_irq(struct e1000_adapter *adapter,
3349 struct e1000_tx_desc *tx_desc, *eop_desc; 3349 struct e1000_tx_desc *tx_desc, *eop_desc;
3350 struct e1000_buffer *buffer_info; 3350 struct e1000_buffer *buffer_info;
3351 unsigned int i, eop; 3351 unsigned int i, eop;
3352#ifdef CONFIG_E1000_NAPI
3353 unsigned int count = 0;
3354#endif
3352 boolean_t cleaned = FALSE; 3355 boolean_t cleaned = FALSE;
3353 3356
3354 i = tx_ring->next_to_clean; 3357 i = tx_ring->next_to_clean;
@@ -3370,6 +3373,11 @@ e1000_clean_tx_irq(struct e1000_adapter *adapter,
3370 3373
3371 eop = tx_ring->buffer_info[i].next_to_watch; 3374 eop = tx_ring->buffer_info[i].next_to_watch;
3372 eop_desc = E1000_TX_DESC(*tx_ring, eop); 3375 eop_desc = E1000_TX_DESC(*tx_ring, eop);
3376#ifdef CONFIG_E1000_NAPI
3377#define E1000_TX_WEIGHT 64
3378 /* weight of a sort for tx, to avoid endless transmit cleanup */
3379 if (count++ == E1000_TX_WEIGHT) break;
3380#endif
3373 } 3381 }
3374 3382
3375 tx_ring->next_to_clean = i; 3383 tx_ring->next_to_clean = i;