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 Reduce diff against FreeBSD. No functional...



details:   https://anonhg.NetBSD.org/src/rev/66a4cdc1f9d8
branches:  trunk
changeset: 821001:66a4cdc1f9d8
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Jan 19 09:42:08 2017 +0000

description:
Reduce diff against FreeBSD. No functional change.

diffstat:

 sys/dev/pci/ixgbe/ixgbe.c |  72 ++++++++++++++++++++++++----------------------
 sys/dev/pci/ixgbe/ixv.c   |   3 +-
 2 files changed, 38 insertions(+), 37 deletions(-)

diffs (148 lines):

diff -r 25571c61f6d2 -r 66a4cdc1f9d8 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Thu Jan 19 06:58:55 2017 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Thu Jan 19 09:42:08 2017 +0000
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 /*$FreeBSD: head/sys/dev/ixgbe/if_ix.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixgbe.c,v 1.62 2017/01/18 10:22:09 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.63 2017/01/19 09:42:08 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -161,6 +161,7 @@
 static int     ixgbe_setup_msix(struct adapter *);
 static void    ixgbe_free_pci_resources(struct adapter *);
 static void    ixgbe_local_timer(void *);
+static void    ixgbe_local_timer1(void *);
 static int     ixgbe_setup_interface(device_t, struct adapter *);
 static void    ixgbe_config_gpie(struct adapter *);
 static void    ixgbe_config_dmac(struct adapter *);
@@ -436,7 +437,6 @@
        return NULL;
 }
 
-
 /*********************************************************************
  *  Device initialization routine
  *
@@ -2219,6 +2219,16 @@
  **********************************************************************/
 
 static void
+ixgbe_local_timer(void *arg)
+{
+       struct adapter *adapter = arg;
+
+       IXGBE_CORE_LOCK(adapter);
+       ixgbe_local_timer1(adapter);
+       IXGBE_CORE_UNLOCK(adapter);
+}
+
+static void
 ixgbe_local_timer1(void *arg)
 {
        struct adapter  *adapter = arg;
@@ -2269,6 +2279,7 @@
                }
 
        }
+
        /* Only truely watchdog if all queues show hung */
        if (hung == adapter->num_queues)
                goto watchdog;
@@ -2287,16 +2298,6 @@
        ixgbe_init_locked(adapter);
 }
 
-static void
-ixgbe_local_timer(void *arg)
-{
-       struct adapter *adapter = arg;
-
-       IXGBE_CORE_LOCK(adapter);
-       ixgbe_local_timer1(adapter);
-       IXGBE_CORE_UNLOCK(adapter);
-}
-
 
 /*
 ** Note: this routine updates the OS on the link state
@@ -5577,6 +5578,30 @@
 #endif
 }
 
+static void
+ixgbe_rearm_queues(struct adapter *adapter, u64 queues)
+{
+       u32 mask;
+
+       switch (adapter->hw.mac.type) {
+       case ixgbe_mac_82598EB:
+               mask = (IXGBE_EIMS_RTX_QUEUE & queues);
+               IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, mask);
+               break;
+       case ixgbe_mac_82599EB:
+       case ixgbe_mac_X540:
+       case ixgbe_mac_X550:
+       case ixgbe_mac_X550EM_x:
+               mask = (queues & 0xFFFFFFFF);
+               IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS_EX(0), mask);
+               mask = (queues >> 32);
+               IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS_EX(1), mask);
+               break;
+       default:
+               break;
+       }
+}
+
 #ifdef PCI_IOV
 
 /*
@@ -6295,26 +6320,3 @@
        return (0);
 }
 #endif /* PCI_IOV */
-static void
-ixgbe_rearm_queues(struct adapter *adapter, u64 queues)
-{
-       u32 mask;
-
-       switch (adapter->hw.mac.type) {
-       case ixgbe_mac_82598EB:
-               mask = (IXGBE_EIMS_RTX_QUEUE & queues);
-               IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, mask);
-               break;
-       case ixgbe_mac_82599EB:
-       case ixgbe_mac_X540:
-       case ixgbe_mac_X550:
-       case ixgbe_mac_X550EM_x:
-               mask = (queues & 0xFFFFFFFF);
-               IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS_EX(0), mask);
-               mask = (queues >> 32);
-               IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS_EX(1), mask);
-               break;
-       default:
-               break;
-       }
-}
diff -r 25571c61f6d2 -r 66a4cdc1f9d8 sys/dev/pci/ixgbe/ixv.c
--- a/sys/dev/pci/ixgbe/ixv.c   Thu Jan 19 06:58:55 2017 +0000
+++ b/sys/dev/pci/ixgbe/ixv.c   Thu Jan 19 09:42:08 2017 +0000
@@ -31,7 +31,7 @@
 
 ******************************************************************************/
 /*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixv.c,v 1.32 2017/01/18 10:22:09 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.33 2017/01/19 09:42:08 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -1521,7 +1521,6 @@
 
        /* Pick up the tuneable queues */
        adapter->num_queues = ixv_num_queues;
-
        adapter->hw.back = adapter;
 
        /*



Home | Main Index | Thread Index | Old Index