Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci/ixgbe Reorder some code to reduce diff between i...



details:   https://anonhg.NetBSD.org/src/rev/54c5e49157c8
branches:  trunk
changeset: 1017370:54c5e49157c8
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Dec 24 10:37:47 2020 +0000

description:
Reorder some code to reduce diff between ixgbe_legacy_irq() and
ixgbe_msix_admin. No functional change intended.

diffstat:

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

diffs (65 lines):

diff -r 34540bb2e6a6 -r 54c5e49157c8 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Thu Dec 24 10:00:36 2020 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Thu Dec 24 10:37:47 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.265 2020/12/24 10:00:36 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.266 2020/12/24 10:37:47 msaitoh Exp $ */
 
 /******************************************************************************
 
@@ -3108,6 +3108,12 @@
        /* Clear all OTHER interrupts with write */
        IXGBE_WRITE_REG(hw, IXGBE_EICR, eicr);
 
+       /* Link status change */
+       if (eicr & IXGBE_EICR_LSC) {
+               IXGBE_WRITE_REG(hw, IXGBE_EIMC, IXGBE_EIMC_LSC);
+               task_requests |= IXGBE_REQUEST_TASK_LSC;
+       }
+
        if (ixgbe_is_sfp(hw)) {
                /* Pluggable optics-related interrupt */
                if (hw->mac.type >= ixgbe_mac_X540)
@@ -3136,12 +3142,6 @@
                }
        }
 
-       /* Link status change */
-       if (eicr & IXGBE_EICR_LSC) {
-               IXGBE_WRITE_REG(hw, IXGBE_EIMC, IXGBE_EIMC_LSC);
-               task_requests |= IXGBE_REQUEST_TASK_LSC;
-       }
-
        if (adapter->hw.mac.type != ixgbe_mac_82598EB) {
                if ((adapter->feat_en & IXGBE_FEATURE_FDIR) &&
                    (eicr & IXGBE_EICR_FLOW_DIR)) {
@@ -5207,11 +5207,9 @@
                IXGBE_TX_UNLOCK(txr);
        }
 
-       /* Check for fan failure */
-       if (adapter->feat_en & IXGBE_FEATURE_FAN_FAIL) {
-               ixgbe_check_fan_failure(adapter, eicr, true);
-               IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP1_BY_MAC(hw));
-       }
+       /* Link status change */
+       if (eicr & IXGBE_EICR_LSC)
+               task_requests |= IXGBE_REQUEST_TASK_LSC;
 
        if (ixgbe_is_sfp(hw)) {
                /* Pluggable optics-related interrupt */
@@ -5241,9 +5239,11 @@
                }
        }
 
-       /* Link status change */
-       if (eicr & IXGBE_EICR_LSC)
-               task_requests |= IXGBE_REQUEST_TASK_LSC;
+       /* Check for fan failure */
+       if (adapter->feat_en & IXGBE_FEATURE_FAN_FAIL) {
+               ixgbe_check_fan_failure(adapter, eicr, true);
+               IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP1_BY_MAC(hw));
+       }
 
        /* External PHY interrupt */
        if ((hw->phy.type == ixgbe_phy_x550em_ext_t) &&



Home | Main Index | Thread Index | Old Index