Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7]: src/sys/dev/pci/ixgbe Pull up following revision(s) (requeste...



details:   https://anonhg.NetBSD.org/src/rev/48a57e22ff01
branches:  netbsd-7
changeset: 798998:48a57e22ff01
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Feb 17 14:54:37 2015 +0000

description:
Pull up following revision(s) (requested by msaitoh in ticket #527):
        sys/dev/pci/ixgbe/ixgbe.c: revision 1.15
  Fix a legacy interrupt problem. If the INTx line was shared with another
device, the ixgbe_legacy_irq() enabled the interrupt even if the interface
was down. Check the interface state and call functions appropriately.

diffstat:

 sys/dev/pci/ixgbe/ixgbe.c |  27 +++++++++++++++------------
 1 files changed, 15 insertions(+), 12 deletions(-)

diffs (57 lines):

diff -r 2bb9eb7db2ea -r 48a57e22ff01 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Tue Feb 17 14:48:10 2015 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Tue Feb 17 14:54:37 2015 +0000
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 /*$FreeBSD: src/sys/dev/ixgbe/ixgbe.c,v 1.51 2011/04/25 23:34:21 jfv Exp $*/
-/*$NetBSD: ixgbe.c,v 1.14 2014/04/21 16:35:06 chs Exp $*/
+/*$NetBSD: ixgbe.c,v 1.14.2.1 2015/02/17 14:54:37 martin Exp $*/
 
 #include "opt_inet.h"
 
@@ -1478,30 +1478,33 @@
 {
        struct ix_queue *que = arg;
        struct adapter  *adapter = que->adapter;
+       struct ifnet   *ifp = adapter->ifp;
        struct ixgbe_hw *hw = &adapter->hw;
        struct          tx_ring *txr = adapter->tx_rings;
-       bool            more_tx, more_rx;
+       bool            more_tx = false, more_rx = false;
        u32             reg_eicr, loop = MAX_LOOP;
 
-
        reg_eicr = IXGBE_READ_REG(hw, IXGBE_EICR);
 
        adapter->stats.legint.ev_count++;
        ++que->irqs;
        if (reg_eicr == 0) {
                adapter->stats.intzero.ev_count++;
-               ixgbe_enable_intr(adapter);
+               if ((ifp->if_flags & IFF_UP) != 0)
+                       ixgbe_enable_intr(adapter);
                return 0;
        }
 
-       more_rx = ixgbe_rxeof(que, adapter->rx_process_limit);
-
-       IXGBE_TX_LOCK(txr);
-       do {
-               adapter->txloops.ev_count++;
-               more_tx = ixgbe_txeof(txr);
-       } while (loop-- && more_tx);
-       IXGBE_TX_UNLOCK(txr);
+       if ((ifp->if_flags & IFF_RUNNING) != 0) {
+               more_rx = ixgbe_rxeof(que, adapter->rx_process_limit);
+
+               IXGBE_TX_LOCK(txr);
+               do {
+                       adapter->txloops.ev_count++;
+                       more_tx = ixgbe_txeof(txr);
+               } while (loop-- && more_tx);
+               IXGBE_TX_UNLOCK(txr);
+       }
 
        if (more_rx || more_tx) {
                if (more_rx)



Home | Main Index | Thread Index | Old Index