diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2010-02-19 19:06:32 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2010-02-19 19:06:32 +0000 |
commit | 0ea9b2e2ea13696e6d09111e1842a73d9740d409 (patch) | |
tree | 94fedeb563c5cef1983368f0523ad3571489ae42 | |
parent | c5ae6f1aa546a981d49a749bfc908f379ca9fda0 (diff) |
Work with pre-standard revision A ProCurve Direct Attach Cables.
Also let the 82598EB SFP+ card work with optical SFP+ modules by ignoring
the EEPROM even though the card officially supports only copper (DA) cables.
From and ok claudio@
-rw-r--r-- | sys/dev/pci/ixgbe_phy.c | 16 | ||||
-rw-r--r-- | sys/dev/pci/ixgbe_type.h | 3 |
2 files changed, 16 insertions, 3 deletions
diff --git a/sys/dev/pci/ixgbe_phy.c b/sys/dev/pci/ixgbe_phy.c index e515def3aca..7aa98e7b9ee 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.3 2010/02/19 18:55:12 jsg Exp $ */ +/* $OpenBSD: ixgbe_phy.c,v 1.4 2010/02/19 19:06:31 jsg Exp $ */ /****************************************************************************** @@ -923,6 +923,9 @@ int32_t ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) hw->phy.ops.read_i2c_eeprom(hw, IXGBE_SFF_CABLE_TECHNOLOGY, &cable_tech); + DEBUGOUT3("SFP+ capa codes 1G %x 10G %x cable %x\n", + comp_codes_1g, comp_codes_10g, cable_tech); + /* ID Module * ========= * 0 SFP_DA_CU @@ -940,6 +943,8 @@ int32_t ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) hw->phy.sfp_type = ixgbe_sfp_type_sr; else if (comp_codes_10g & IXGBE_SFF_10GBASELR_CAPABLE) hw->phy.sfp_type = ixgbe_sfp_type_lr; + else if (comp_codes_10g & IXGBE_SFF_DA_BAD_HP_CABLE) + hw->phy.sfp_type = ixgbe_sfp_type_da_cu; else hw->phy.sfp_type = ixgbe_sfp_type_unknown; } else if (hw->mac.type == ixgbe_mac_82599EB) { @@ -1052,6 +1057,7 @@ int32_t ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) status = IXGBE_ERR_SFP_NOT_SUPPORTED; } } else { + DEBUGOUT("SFP+ module type ignored\n"); status = IXGBE_SUCCESS; } } @@ -1117,7 +1123,13 @@ int32_t ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw, } } - if (sfp_id == IXGBE_PHY_INIT_END_NL) { + /* + * the 82598EB SFP+ card offically supports only direct attached cables + * but works fine with optical SFP+ modules as well. Even though the + * EEPROM has no matching ID for them. So just accept the module. + */ + if (sfp_id == IXGBE_PHY_INIT_END_NL && + hw->mac.type >= ixgbe_mac_82599EB) { DEBUGOUT("No matching SFP+ module found\n"); return IXGBE_ERR_SFP_NOT_SUPPORTED; } diff --git a/sys/dev/pci/ixgbe_type.h b/sys/dev/pci/ixgbe_type.h index a83885be0bb..a7ad877dfc5 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.4 2010/02/19 18:55:12 jsg Exp $ */ +/* $OpenBSD: ixgbe_type.h,v 1.5 2010/02/19 19:06:31 jsg Exp $ */ /****************************************************************************** @@ -2697,6 +2697,7 @@ struct ixgbe_hw { #define IXGBE_SFF_1GBASELX_CAPABLE 0x2 #define IXGBE_SFF_10GBASESR_CAPABLE 0x10 #define IXGBE_SFF_10GBASELR_CAPABLE 0x20 +#define IXGBE_SFF_DA_BAD_HP_CABLE 0x80 #define IXGBE_I2C_EEPROM_READ_MASK 0x100 #define IXGBE_I2C_EEPROM_STATUS_MASK 0x3 #define IXGBE_I2C_EEPROM_STATUS_NO_OPERATION 0x0 |