aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-19 21:21:01 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-19 21:21:01 -0400
commit46fcc86dd71d70211e965102fb69414c90381880 (patch)
treed9b3e9fd6e49206d8399600383b6339634dc8103
parent2b858bd02ffca71391161f5709588fc70da79531 (diff)
Revert "e1000: fix NAPI performance on 4-port adapters"
This reverts commit 60cba200f11b6f90f35634c5cd608773ae3721b7. It's been linked to lockups of the e1000 hardware, see for example https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=229603 but it's likely that the commit itself is not really introducing the bug, but just allowing an unrelated problem to rear its ugly head (ie one current working theory is that the code exposes us to a hardware race condition by decreasing the amount of time we spend in each NAPI poll cycle). We'll revert it until root cause is known. Intel has a repeatable reproduction on two different machines and bus traces of the hardware doing something bad. Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Cc: Jeff Garzik <jeff@garzik.org> Cc: David S. Miller <davem@davemloft.net> Cc: Greg KH <gregkh@suse.de> Cc: Dave Jones <davej@redhat.com> Cc: Auke Kok <auke-jan.h.kok@intel.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/net/e1000/e1000_main.c13
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)) {
3954quit_polling: 3954quit_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