diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2014-08-25 14:26:26 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2014-08-25 14:26:26 +0000 |
commit | 6734e5d4e7b620727961f19bdafe3d0165c8e09c (patch) | |
tree | 75cf04985097b7a0c80b371124d10e6e9d2b0ccb | |
parent | 970b26ec4389cce4f07f4d0afcdfda199a9118be (diff) |
We have never limited the definition of "supported SPF modules"
to the vendor/make whitelist maintained by Intel so there's no
reason to start doing it now.
When syncing the driver to the FreeBSD codebase I have decided
to take this chunk as is but it appears that it breaks cheap
chinese SFP+ fiber optics modules that we all love. And while
there's still a lot of places where we check for the vendor
OUI, most of these checks are not necessary.
Issue reported and fix tested by Tony Sarendal. Thanks!
-rw-r--r-- | sys/dev/pci/if_ix.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/ixgbe_phy.c | 32 | ||||
-rw-r--r-- | sys/dev/pci/ixgbe_type.h | 3 | ||||
-rw-r--r-- | sys/dev/pci/ixgbe_x540.c | 3 |
4 files changed, 10 insertions, 32 deletions
diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c index 395d61cc735..e55b0452693 100644 --- a/sys/dev/pci/if_ix.c +++ b/sys/dev/pci/if_ix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ix.c,v 1.97 2014/08/20 10:06:31 mikeb Exp $ */ +/* $OpenBSD: if_ix.c,v 1.98 2014/08/25 14:26:25 mikeb Exp $ */ /****************************************************************************** @@ -258,7 +258,7 @@ ixgbe_attach(struct device *parent, struct device *self, void *aux) "please contact your Intel or hardware representative " "who provided you with this hardware.\n"); } else if (error == IXGBE_ERR_SFP_NOT_SUPPORTED) { - printf("Unsupported SFP+ Module\n"); + printf(": Unsupported SFP+ Module\n"); } if (error) { diff --git a/sys/dev/pci/ixgbe_phy.c b/sys/dev/pci/ixgbe_phy.c index d2f6e5a60e6..945b60c9f03 100644 --- a/sys/dev/pci/ixgbe_phy.c +++ b/sys/dev/pci/ixgbe_phy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ixgbe_phy.c,v 1.11 2013/08/05 19:58:06 mikeb Exp $ */ +/* $OpenBSD: ixgbe_phy.c,v 1.12 2014/08/25 14:26:25 mikeb Exp $ */ /****************************************************************************** @@ -995,7 +995,6 @@ int32_t ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) uint8_t oui_bytes[3] = {0, 0, 0}; uint8_t cable_tech = 0; uint8_t cable_spec = 0; - uint16_t enforce_sfp = 0; DEBUGFUNC("ixgbe_identify_sfp_module_generic"); @@ -1207,30 +1206,11 @@ int32_t ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) goto out; } - /* Anything else 82598-based is supported */ - if (hw->mac.type == ixgbe_mac_82598EB) { - status = IXGBE_SUCCESS; - goto out; - } - - if (hw->mac.type != ixgbe_mac_82598EB) - ixgbe_get_device_caps_generic(hw, &enforce_sfp); - if (!(enforce_sfp & IXGBE_DEVICE_CAPS_ALLOW_ANY_SFP) && - !(hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core0 || - hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core1 || - hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 || - hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1)) { - /* Make sure we're a supported PHY type */ - if (hw->phy.type == ixgbe_phy_sfp_intel) { - status = IXGBE_SUCCESS; - } else { - DEBUGOUT("SFP+ module not supported\n"); - hw->phy.type = ixgbe_phy_sfp_unsupported; - status = IXGBE_ERR_SFP_NOT_SUPPORTED; - } - } else { - status = IXGBE_SUCCESS; - } + /* + * We do not limit the definition of "supported SPF modules" + * to the vendor/make whitelist. + */ + status = IXGBE_SUCCESS; } out: diff --git a/sys/dev/pci/ixgbe_type.h b/sys/dev/pci/ixgbe_type.h index b942cce3639..9a6710c4add 100644 --- a/sys/dev/pci/ixgbe_type.h +++ b/sys/dev/pci/ixgbe_type.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ixgbe_type.h,v 1.19 2013/08/05 19:58:06 mikeb Exp $ */ +/* $OpenBSD: ixgbe_type.h,v 1.20 2014/08/25 14:26:25 mikeb Exp $ */ /****************************************************************************** @@ -3004,7 +3004,6 @@ struct ixgbe_mac_operations { int32_t (*get_mac_addr)(struct ixgbe_hw *, uint8_t *); int32_t (*get_san_mac_addr)(struct ixgbe_hw *, uint8_t *); int32_t (*set_san_mac_addr)(struct ixgbe_hw *, uint8_t *); - int32_t (*get_device_caps)(struct ixgbe_hw *, uint16_t *); int32_t (*get_wwn_prefix)(struct ixgbe_hw *, uint16_t *, uint16_t *); int32_t (*get_fcoe_boot_status)(struct ixgbe_hw *, uint16_t *); int32_t (*stop_adapter)(struct ixgbe_hw *); diff --git a/sys/dev/pci/ixgbe_x540.c b/sys/dev/pci/ixgbe_x540.c index 446ea7c5780..23c6196316b 100644 --- a/sys/dev/pci/ixgbe_x540.c +++ b/sys/dev/pci/ixgbe_x540.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ixgbe_x540.c,v 1.2 2013/08/05 19:58:06 mikeb Exp $ */ +/* $OpenBSD: ixgbe_x540.c,v 1.3 2014/08/25 14:26:25 mikeb Exp $ */ /****************************************************************************** @@ -105,7 +105,6 @@ int32_t ixgbe_init_ops_X540(struct ixgbe_hw *hw) mac->ops.read_analog_reg8 = NULL; mac->ops.write_analog_reg8 = NULL; mac->ops.start_hw = &ixgbe_start_hw_X540; - mac->ops.get_device_caps = &ixgbe_get_device_caps_generic; mac->ops.acquire_swfw_sync = &ixgbe_acquire_swfw_sync_X540; mac->ops.release_swfw_sync = &ixgbe_release_swfw_sync_X540; mac->ops.disable_sec_rx_path = &ixgbe_disable_sec_rx_path_generic; |