Module Name: src Committed By: msaitoh Date: Thu Jan 19 09:42:08 UTC 2017
Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c ixv.c Log Message: Reduce diff against FreeBSD. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.32 -r1.33 src/sys/dev/pci/ixgbe/ixv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.62 src/sys/dev/pci/ixgbe/ixgbe.c:1.63 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.62 Wed Jan 18 10:22:09 2017 +++ src/sys/dev/pci/ixgbe/ixgbe.c Thu Jan 19 09:42:08 2017 @@ -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_allocate_legacy(st 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 @@ ixgbe_lookup(const struct pci_attach_arg return NULL; } - /********************************************************************* * Device initialization routine * @@ -2219,6 +2219,16 @@ ixgbe_mc_array_itr(struct ixgbe_hw *hw, **********************************************************************/ 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 @@ ixgbe_local_timer1(void *arg) } } + /* Only truely watchdog if all queues show hung */ if (hung == adapter->num_queues) goto watchdog; @@ -2287,16 +2298,6 @@ watchdog: 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 @@ ixgbe_disable_rx_drop(struct adapter *ad #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 @@ ixgbe_add_vf(device_t dev, u16 vfnum, co 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; - } -} Index: src/sys/dev/pci/ixgbe/ixv.c diff -u src/sys/dev/pci/ixgbe/ixv.c:1.32 src/sys/dev/pci/ixgbe/ixv.c:1.33 --- src/sys/dev/pci/ixgbe/ixv.c:1.32 Wed Jan 18 10:22:09 2017 +++ src/sys/dev/pci/ixgbe/ixv.c Thu Jan 19 09:42:08 2017 @@ -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 @@ map_err: /* Pick up the tuneable queues */ adapter->num_queues = ixv_num_queues; - adapter->hw.back = adapter; /*