]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Revert "e1000: fix NAPI performance on 4-port adapters"
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 20 Apr 2007 01:21:01 +0000 (18:21 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 20 Apr 2007 01:21:01 +0000 (18:21 -0700)
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>
drivers/net/e1000/e1000_main.c

index 1d08e937af825421009ba1071190ac1dc5049a9c..b28a915bd980983738fe30180c57c1c5956a01a0 100644 (file)
@@ -3796,7 +3796,7 @@ e1000_intr_msi(int irq, void *data)
 
        for (i = 0; i < E1000_MAX_INTR; i++)
                if (unlikely(!adapter->clean_rx(adapter, adapter->rx_ring) &
-                  e1000_clean_tx_irq(adapter, adapter->tx_ring)))
+                  !e1000_clean_tx_irq(adapter, adapter->tx_ring)))
                        break;
 
        if (likely(adapter->itr_setting & 3))
@@ -3899,7 +3899,7 @@ e1000_intr(int irq, void *data)
 
        for (i = 0; i < E1000_MAX_INTR; i++)
                if (unlikely(!adapter->clean_rx(adapter, adapter->rx_ring) &
-                  e1000_clean_tx_irq(adapter, adapter->tx_ring)))
+                  !e1000_clean_tx_irq(adapter, adapter->tx_ring)))
                        break;
 
        if (likely(adapter->itr_setting & 3))
@@ -3949,7 +3949,7 @@ e1000_clean(struct net_device *poll_dev, int *budget)
        poll_dev->quota -= work_done;
 
        /* If no Tx and not enough Rx work done, exit the polling mode */
-       if ((tx_cleaned && (work_done < work_to_do)) ||
+       if ((!tx_cleaned && (work_done == 0)) ||
           !netif_running(poll_dev)) {
 quit_polling:
                if (likely(adapter->itr_setting & 3))
@@ -3979,7 +3979,7 @@ e1000_clean_tx_irq(struct e1000_adapter *adapter,
 #ifdef CONFIG_E1000_NAPI
        unsigned int count = 0;
 #endif
-       boolean_t cleaned = TRUE;
+       boolean_t cleaned = FALSE;
        unsigned int total_tx_bytes=0, total_tx_packets=0;
 
        i = tx_ring->next_to_clean;
@@ -4013,10 +4013,7 @@ e1000_clean_tx_irq(struct e1000_adapter *adapter,
 #ifdef CONFIG_E1000_NAPI
 #define E1000_TX_WEIGHT 64
                /* weight of a sort for tx, to avoid endless transmit cleanup */
-               if (count++ == E1000_TX_WEIGHT) {
-                       cleaned = FALSE;
-                       break;
-               }
+               if (count++ == E1000_TX_WEIGHT) break;
 #endif
        }