diff options
| author | msaitoh <msaitoh@NetBSD.org> | 2018-06-11 10:34:18 +0000 |
|---|---|---|
| committer | msaitoh <msaitoh@NetBSD.org> | 2018-06-11 10:34:18 +0000 |
| commit | 9a7f58ef3fc03d741b524deb4f164d6acb79352e (patch) | |
| tree | 40de391f6908795ba59abb1bfb1bfd698b0b2a80 /sys/dev | |
| parent | 196750551e22a4ef8cd6db053089231e286cbf8c (diff) | |
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 (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/pci/ixgbe/ixgbe_82599.c | 5 | ||||
| -rw-r--r-- | sys/dev/pci/ixgbe/ixgbe_api.c | 3 | ||||
| -rw-r--r-- | sys/dev/pci/ixgbe/ixgbe_type.h | 14 | ||||
| -rw-r--r-- | sys/dev/pci/ixgbe/ixgbe_x540.c | 2 |
4 files changed, 20 insertions, 4 deletions
diff --git a/sys/dev/pci/ixgbe/ixgbe_82599.c b/sys/dev/pci/ixgbe/ixgbe_82599.c index 558ee4ad706..40344d0fae9 100644 --- a/sys/dev/pci/ixgbe/ixgbe_82599.c +++ b/sys/dev/pci/ixgbe/ixgbe_82599.c @@ -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_type_82599(struct ixgbe_hw *hw) 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 --git a/sys/dev/pci/ixgbe/ixgbe_api.c b/sys/dev/pci/ixgbe/ixgbe_api.c index 5394ccffdea..89506f79c57 100644 --- a/sys/dev/pci/ixgbe/ixgbe_api.c +++ b/sys/dev/pci/ixgbe/ixgbe_api.c @@ -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 *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: diff --git a/sys/dev/pci/ixgbe/ixgbe_type.h b/sys/dev/pci/ixgbe/ixgbe_type.h index 9423056e300..f1e2f79540a 100644 --- a/sys/dev/pci/ixgbe/ixgbe_type.h +++ b/sys/dev/pci/ixgbe/ixgbe_type.h @@ -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, diff --git a/sys/dev/pci/ixgbe/ixgbe_x540.c b/sys/dev/pci/ixgbe/ixgbe_x540.c index 4b2fb5f9b7a..3e483e665cc 100644 --- a/sys/dev/pci/ixgbe/ixgbe_x540.c +++ b/sys/dev/pci/ixgbe/ixgbe_x540.c @@ -790,7 +790,7 @@ s32 ixgbe_acquire_swfw_sync_X540(struct ixgbe_hw *hw, u32 mask) 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++) { |
