Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/9ff55a3af6f5
branches:  netbsd-9
changeset: 359942:9ff55a3af6f5
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Feb 01 11:35:45 2022 +0000

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

        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 f76450170801 -r 9ff55a3af6f5 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Mon Jan 31 17:56:28 2022 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Tue Feb 01 11:35:45 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.199.2.18 2022/01/31 17:36:25 martin Exp $ */
+/* $NetBSD: ixgbe.c,v 1.199.2.19 2022/02/01 11:35:45 martin Exp $ */
 
 /******************************************************************************
 
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.199.2.18 2022/01/31 17:36:25 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.199.2.19 2022/02/01 11:35:45 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -5115,28 +5115,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