Module Name: src Committed By: msaitoh Date: Mon Jun 11 10:34:18 UTC 2018
Modified Files: src/sys/dev/pci/ixgbe: ixgbe_82599.c ixgbe_api.c ixgbe_type.h ixgbe_x540.c Log Message: 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_*). To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/dev/pci/ixgbe/ixgbe_82599.c cvs rdiff -u -r1.20 -r1.21 src/sys/dev/pci/ixgbe/ixgbe_api.c cvs rdiff -u -r1.34 -r1.35 src/sys/dev/pci/ixgbe/ixgbe_type.h cvs rdiff -u -r1.15 -r1.16 src/sys/dev/pci/ixgbe/ixgbe_x540.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_82599.c diff -u src/sys/dev/pci/ixgbe/ixgbe_82599.c:1.19 src/sys/dev/pci/ixgbe/ixgbe_82599.c:1.20 --- src/sys/dev/pci/ixgbe/ixgbe_82599.c:1.19 Wed Apr 4 08:59:22 2018 +++ src/sys/dev/pci/ixgbe/ixgbe_82599.c Mon Jun 11 10:34:18 2018 @@ -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 @@ enum ixgbe_media_type ixgbe_get_media_ty 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; Index: src/sys/dev/pci/ixgbe/ixgbe_api.c diff -u src/sys/dev/pci/ixgbe/ixgbe_api.c:1.20 src/sys/dev/pci/ixgbe/ixgbe_api.c:1.21 --- src/sys/dev/pci/ixgbe/ixgbe_api.c:1.20 Wed Apr 4 08:59:22 2018 +++ src/sys/dev/pci/ixgbe/ixgbe_api.c Mon Jun 11 10:34:18 2018 @@ -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 @@ s32 ixgbe_set_mac_type(struct ixgbe_hw * 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: Index: src/sys/dev/pci/ixgbe/ixgbe_type.h diff -u src/sys/dev/pci/ixgbe/ixgbe_type.h:1.34 src/sys/dev/pci/ixgbe/ixgbe_type.h:1.35 --- src/sys/dev/pci/ixgbe/ixgbe_type.h:1.34 Wed Apr 4 08:59:22 2018 +++ src/sys/dev/pci/ixgbe/ixgbe_type.h Mon Jun 11 10:34:18 2018 @@ -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 @@ enum { #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 @@ enum ixgbe_media_type { 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, Index: src/sys/dev/pci/ixgbe/ixgbe_x540.c diff -u src/sys/dev/pci/ixgbe/ixgbe_x540.c:1.15 src/sys/dev/pci/ixgbe/ixgbe_x540.c:1.16 --- src/sys/dev/pci/ixgbe/ixgbe_x540.c:1.15 Wed Apr 4 08:59:22 2018 +++ src/sys/dev/pci/ixgbe/ixgbe_x540.c Mon Jun 11 10:34:18 2018 @@ -790,7 +790,7 @@ s32 ixgbe_acquire_swfw_sync_X540(struct 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++) {