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 following revision(s) (requeste...
details: https://anonhg.NetBSD.org/src/rev/a46af042a77a
branches: netbsd-8
changeset: 435151:a46af042a77a
user: snj <snj%NetBSD.org@localhost>
date: Thu Jul 26 23:21:54 2018 +0000
description:
Pull up following revision(s) (requested by msaitoh in ticket #935):
sys/dev/pci/ixgbe/ixgbe.c: revision 1.162
sys/dev/pci/ixgbe/ixgbe_82599.c: revision 1.20
sys/dev/pci/ixgbe/ixgbe_api.c: revision 1.21
sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.35
sys/dev/pci/ixgbe/ixgbe_x540.c: revision 1.16
Apply changes of FreeBSD ix-3.2.18.tgz:
- Add IXGBE_DEV_ID_82599_LS(0x154f) support.
- Increase timeout for newer than ixgbe_mac_X550 (i.e. Xeon-D and Denverton)
in ixgbe_acquire_swfw_sync_X540().
- Add some unused macros (IXGBE_FW_LESM_*).
--
Remove nmbclusters check. We don't use the mbuf cluster. The old code also had
a bug that ixgbe_total_ports adds two every port and never decrement in
the detach path. Found by hikaru@.
The code was removed in FreeBSD when it switched to use iflib and OpenBSD
removed the code 8 years ago.
diffstat:
sys/dev/pci/ixgbe/ixgbe.c | 21 +--------------------
sys/dev/pci/ixgbe/ixgbe_82599.c | 5 ++++-
sys/dev/pci/ixgbe/ixgbe_api.c | 3 ++-
sys/dev/pci/ixgbe/ixgbe_type.h | 14 +++++++++++++-
sys/dev/pci/ixgbe/ixgbe_x540.c | 2 +-
5 files changed, 21 insertions(+), 24 deletions(-)
diffs (139 lines):
diff -r 22d4655ba1ab -r a46af042a77a sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Thu Jul 26 23:15:55 2018 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Thu Jul 26 23:21:54 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.88.2.20 2018/06/09 14:59:43 martin Exp $ */
+/* $NetBSD: ixgbe.c,v 1.88.2.21 2018/07/26 23:21:54 snj Exp $ */
/******************************************************************************
@@ -392,9 +392,6 @@
SYSCTL_INT(_hw_ix, OID_AUTO, enable_rss, CTLFLAG_RDTUN, &ixgbe_enable_rss, 0,
"Enable Receive-Side Scaling (RSS)");
-/* Keep running tab on them for sanity check */
-static int ixgbe_total_ports;
-
#if 0
static int (*ixgbe_start_locked)(struct ifnet *, struct tx_ring *);
static int (*ixgbe_ring_empty)(struct ifnet *, pcq_t *);
@@ -929,21 +926,6 @@
} else
adapter->num_tx_desc = ixgbe_txd;
- /*
- * With many RX rings it is easy to exceed the
- * system mbuf allocation. Tuning nmbclusters
- * can alleviate this.
- */
- if (nmbclusters > 0) {
- int s;
- s = (ixgbe_rxd * adapter->num_queues) * ixgbe_total_ports;
- if (s > nmbclusters) {
- aprint_error_dev(dev, "RX Descriptors exceed "
- "system mbuf max, using default instead!\n");
- ixgbe_rxd = DEFAULT_RXD;
- }
- }
-
if (((ixgbe_rxd * sizeof(union ixgbe_adv_rx_desc)) % DBA_ALIGN) != 0 ||
ixgbe_rxd < MIN_RXD || ixgbe_rxd > MAX_RXD) {
aprint_error_dev(dev, "RXD config issue, using default!\n");
@@ -5956,7 +5938,6 @@
(ent->subvendor_id == 0)) &&
((PCI_SUBSYS_ID(subid) == ent->subdevice_id) ||
(ent->subdevice_id == 0))) {
- ++ixgbe_total_ports;
return ent;
}
}
diff -r 22d4655ba1ab -r a46af042a77a sys/dev/pci/ixgbe/ixgbe_82599.c
--- a/sys/dev/pci/ixgbe/ixgbe_82599.c Thu Jul 26 23:15:55 2018 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_82599.c Thu Jul 26 23:21:54 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_82599.c,v 1.14.8.3 2018/04/14 10:25:11 martin Exp $ */
+/* $NetBSD: ixgbe_82599.c,v 1.14.8.4 2018/07/26 23:21:54 snj Exp $ */
/******************************************************************************
SPDX-License-Identifier: BSD-3-Clause
@@ -566,6 +566,9 @@
case IXGBE_DEV_ID_82599_T3_LOM:
media_type = ixgbe_media_type_copper;
break;
+ case IXGBE_DEV_ID_82599_LS:
+ media_type = ixgbe_media_type_fiber_lco;
+ break;
case IXGBE_DEV_ID_82599_QSFP_SF_QP:
media_type = ixgbe_media_type_fiber_qsfp;
break;
diff -r 22d4655ba1ab -r a46af042a77a sys/dev/pci/ixgbe/ixgbe_api.c
--- a/sys/dev/pci/ixgbe/ixgbe_api.c Thu Jul 26 23:15:55 2018 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_api.c Thu Jul 26 23:21:54 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_api.c,v 1.15.8.3 2018/04/14 10:25:11 martin Exp $ */
+/* $NetBSD: ixgbe_api.c,v 1.15.8.4 2018/07/26 23:21:54 snj Exp $ */
/******************************************************************************
SPDX-License-Identifier: BSD-3-Clause
@@ -173,6 +173,7 @@
case IXGBE_DEV_ID_82599_SFP_SF_QP:
case IXGBE_DEV_ID_82599_QSFP_SF_QP:
case IXGBE_DEV_ID_82599EN_SFP:
+ case IXGBE_DEV_ID_82599_LS:
case IXGBE_DEV_ID_82599_CX4:
case IXGBE_DEV_ID_82599_BYPASS:
case IXGBE_DEV_ID_82599_T3_LOM:
diff -r 22d4655ba1ab -r a46af042a77a sys/dev/pci/ixgbe/ixgbe_type.h
--- a/sys/dev/pci/ixgbe/ixgbe_type.h Thu Jul 26 23:15:55 2018 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_type.h Thu Jul 26 23:21:54 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_type.h,v 1.22.2.5 2018/04/14 10:25:11 martin Exp $ */
+/* $NetBSD: ixgbe_type.h,v 1.22.2.6 2018/07/26 23:21:54 snj Exp $ */
/******************************************************************************
SPDX-License-Identifier: BSD-3-Clause
@@ -131,6 +131,7 @@
#define IXGBE_SUBDEV_ID_82599EN_SFP_OCP1 0x0001
#define IXGBE_DEV_ID_82599_XAUI_LOM PCI_PRODUCT_INTEL_82599_XAUI_LOM
#define IXGBE_DEV_ID_82599_T3_LOM 0x151C
+#define IXGBE_DEV_ID_82599_LS 0x154F
#define IXGBE_DEV_ID_82599_VF 0x10ED
#define IXGBE_DEV_ID_82599_VF_HV 0x152E
#define IXGBE_DEV_ID_82599_BYPASS 0x155D
@@ -2466,6 +2467,16 @@
#define IXGBE_FW_LESM_PARAMETERS_PTR 0x2
#define IXGBE_FW_LESM_STATE_1 0x1
#define IXGBE_FW_LESM_STATE_ENABLED 0x8000 /* LESM Enable bit */
+#define IXGBE_FW_LESM_2_STATES_ENABLED_MASK 0x1F
+#define IXGBE_FW_LESM_2_STATES_ENABLED 0x12
+#define IXGBE_FW_LESM_STATE0_10G_ENABLED 0x6FFF
+#define IXGBE_FW_LESM_STATE1_10G_ENABLED 0x4FFF
+#define IXGBE_FW_LESM_STATE0_10G_DISABLED 0x0FFF
+#define IXGBE_FW_LESM_STATE1_10G_DISABLED 0x2FFF
+#define IXGBE_FW_LESM_PORT0_STATE0_OFFSET 0x2
+#define IXGBE_FW_LESM_PORT0_STATE1_OFFSET 0x3
+#define IXGBE_FW_LESM_PORT1_STATE0_OFFSET 0x6
+#define IXGBE_FW_LESM_PORT1_STATE1_OFFSET 0x7
#define IXGBE_FW_PASSTHROUGH_PATCH_CONFIG_PTR 0x4
#define IXGBE_FW_PATCH_VERSION_4 0x7
#define IXGBE_FCOE_IBA_CAPS_BLK_PTR 0x33 /* iSCSI/FCOE block */
@@ -3748,6 +3759,7 @@
ixgbe_media_type_fiber,
ixgbe_media_type_fiber_fixed,
ixgbe_media_type_fiber_qsfp,
+ ixgbe_media_type_fiber_lco,
ixgbe_media_type_copper,
ixgbe_media_type_backplane,
ixgbe_media_type_cx4,
diff -r 22d4655ba1ab -r a46af042a77a sys/dev/pci/ixgbe/ixgbe_x540.c
--- a/sys/dev/pci/ixgbe/ixgbe_x540.c Thu Jul 26 23:15:55 2018 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_x540.c Thu Jul 26 23:21:54 2018 +0000
@@ -790,7 +790,7 @@
swmask |= swi2c_mask;
fwmask |= swi2c_mask << 2;
- if (hw->mac.type == ixgbe_mac_X550)
+ if (hw->mac.type >= ixgbe_mac_X550)
timeout = 1000;
for (i = 0; i < timeout; i++) {
Home |
Main Index |
Thread Index |
Old Index