Hi,
On a 5.6-release I have an ix card which refuses to work with unsupported SFP+
modules, saying this : ix0 at pci1 dev 0 function 0 "Intel 82599" rev
0x01Unsupported SFP+ Module.
However, this seems to be an artificial limitation of the ix driver : the
following diff (against sys.tar.gz as of 5.6-release) allows my SFP+ and it
works fine so far.
The patch was made in a hurry, so I probably have cut more than I should... Is
there a simpler/better way to fix this ?
diff -nur sys-ori/dev/pci/ixgbe_phy.c sys/dev/pci/ixgbe_phy.c
--- sys-ori/dev/pci/ixgbe_phy.c Mon Aug 5 21:58:06 2013
+++ sys/dev/pci/ixgbe_phy.c Fri Dec 5 10:09:54 2014
@@ -1015,10 +1015,6 @@
/* LAN ID is needed for sfp_type determination */
hw->mac.ops.set_lan_id(hw);
- if (identifier != IXGBE_SFF_IDENTIFIER_SFP) {
- hw->phy.type = ixgbe_phy_sfp_unsupported;
- status = IXGBE_ERR_SFP_NOT_SUPPORTED;
- } else {
status = hw->phy.ops.read_i2c_eeprom(hw,
IXGBE_SFF_1GBE_COMP_CODES,
&comp_codes_1g);
@@ -1196,17 +1192,6 @@
goto out;
}
- /* Verify supported 1G SFP modules */
- if (comp_codes_10g == 0 &&
- !(hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core1 ||
- hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core0 ||
- hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 ||
- hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1)) {
- hw->phy.type = ixgbe_phy_sfp_unsupported;
- status = IXGBE_ERR_SFP_NOT_SUPPORTED;
- goto out;
- }
-
/* Anything else 82598-based is supported */
if (hw->mac.type == ixgbe_mac_82598EB) {
status = IXGBE_SUCCESS;
@@ -1215,23 +1200,7 @@
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;
- }
- }
+ status = IXGBE_SUCCESS;
out:
return status;
@@ -1262,9 +1231,6 @@
uint16_t sfp_type = hw->phy.sfp_type;
DEBUGFUNC("ixgbe_get_sfp_init_sequence_offsets");
-
- if (hw->phy.sfp_type == ixgbe_sfp_type_unknown)
- return IXGBE_ERR_SFP_NOT_SUPPORTED;
if (hw->phy.sfp_type == ixgbe_sfp_type_not_present)
return IXGBE_ERR_SFP_NOT_PRESENT;