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 Apply changes of FreeBSD ix-3.2.18.tgz:



details:   https://anonhg.NetBSD.org/src/rev/900634e24d65
branches:  trunk
changeset: 833099:900634e24d65
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon Jun 11 10:34:18 2018 +0000

description:
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_*).

diffstat:

 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 +-
 4 files changed, 20 insertions(+), 4 deletions(-)

diffs (90 lines):

diff -r b629f6a1fc32 -r 900634e24d65 sys/dev/pci/ixgbe/ixgbe_82599.c
--- a/sys/dev/pci/ixgbe/ixgbe_82599.c   Mon Jun 11 01:34:03 2018 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_82599.c   Mon Jun 11 10:34:18 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_82599.c,v 1.19 2018/04/04 08:59:22 msaitoh Exp $ */
+/* $NetBSD: ixgbe_82599.c,v 1.20 2018/06/11 10:34:18 msaitoh 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 b629f6a1fc32 -r 900634e24d65 sys/dev/pci/ixgbe/ixgbe_api.c
--- a/sys/dev/pci/ixgbe/ixgbe_api.c     Mon Jun 11 01:34:03 2018 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_api.c     Mon Jun 11 10:34:18 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_api.c,v 1.20 2018/04/04 08:59:22 msaitoh Exp $ */
+/* $NetBSD: ixgbe_api.c,v 1.21 2018/06/11 10:34:18 msaitoh 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 b629f6a1fc32 -r 900634e24d65 sys/dev/pci/ixgbe/ixgbe_type.h
--- a/sys/dev/pci/ixgbe/ixgbe_type.h    Mon Jun 11 01:34:03 2018 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_type.h    Mon Jun 11 10:34:18 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_type.h,v 1.34 2018/04/04 08:59:22 msaitoh Exp $ */
+/* $NetBSD: ixgbe_type.h,v 1.35 2018/06/11 10:34:18 msaitoh 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 b629f6a1fc32 -r 900634e24d65 sys/dev/pci/ixgbe/ixgbe_x540.c
--- a/sys/dev/pci/ixgbe/ixgbe_x540.c    Mon Jun 11 01:34:03 2018 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_x540.c    Mon Jun 11 10:34:18 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