Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/dev/pci/ixgbe Pull up the following revisions, reques...



details:   https://anonhg.NetBSD.org/src/rev/1e1eaa557392
branches:  netbsd-8
changeset: 359945:1e1eaa557392
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Feb 01 11:38:29 2022 +0000

description:
Pull up the following revisions, requested by msaitoh in ticket #1734:

        sys/dev/pci/ixgbe/ixgbe.c                       1.264,1.269,1.272,
                                                        1.306 via patch

Four INTx related fixes:
- Fix a bug that the all interrupt sources are enabled when the
  interface is UP and the INTx line is shared with other devices.
- Fix a bug that it might incorrectly enable interrupt when
  IFF_RUNNING is not set.
- Don't process TX/RX if a queue interrupt isn't occurred.
- Increment legacy interrupt counter after checking INTx sharing.

diffstat:

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

diffs (63 lines):

diff -r 712bfcba015f -r 1e1eaa557392 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Mon Jan 31 17:59:40 2022 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Tue Feb 01 11:38:29 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.88.2.48 2022/01/31 17:38:36 martin Exp $ */
+/* $NetBSD: ixgbe.c,v 1.88.2.49 2022/02/01 11:38:29 martin Exp $ */
 
 /******************************************************************************
 
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.88.2.48 2022/01/31 17:38:36 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.88.2.49 2022/02/01 11:38:29 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -5074,28 +5074,34 @@
        struct ix_queue *que = arg;
        struct adapter  *adapter = que->adapter;
        struct ixgbe_hw *hw = &adapter->hw;
-       struct ifnet    *ifp = adapter->ifp;
        struct          tx_ring *txr = adapter->tx_rings;
        bool            more = false;
        u32             eicr, eicr_mask;
-
-       /* Silicon errata #26 on 82598 */
+       u32             eims_orig;
+
+       eims_orig = IXGBE_READ_REG(hw, IXGBE_EIMS);
+       /*
+        * Silicon errata #26 on 82598. Disable all interrupts before reading
+        * EICR.
+        */
        IXGBE_WRITE_REG(hw, IXGBE_EIMC, IXGBE_IRQ_CLEAR_MASK);
 
        eicr = IXGBE_READ_REG(hw, IXGBE_EICR);
 
-       adapter->stats.pf.legint.ev_count++;
-       ++que->irqs.ev_count;
        if (eicr == 0) {
                adapter->stats.pf.intzero.ev_count++;
-               if ((ifp->if_flags & IFF_UP) != 0)
-                       ixgbe_enable_intr(adapter);
+               IXGBE_WRITE_REG(hw, IXGBE_EIMS, eims_orig);
                return 0;
        }
-
-       if ((ifp->if_flags & IFF_RUNNING) != 0) {
+       adapter->stats.pf.legint.ev_count++;
+
+       /* Queue (0) intr */
+       if ((eicr & IXGBE_EIMC_RTX_QUEUE) != 0) {
+               ++que->irqs.ev_count;
+
                /*
-                * The same as ixgbe_msix_que() about "que->txrx_use_workqueue".
+                * The same as ixgbe_msix_que() about
+                * "que->txrx_use_workqueue".
                 */
                que->txrx_use_workqueue = adapter->txrx_use_workqueue;
 



Home | Main Index | Thread Index | Old Index