Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ixgbe/ixgbe_phy.c
Show First 20 Lines • Show All 1,530 Lines • ▼ Show 20 Lines | if (!(enforce_sfp & IXGBE_DEVICE_CAPS_ALLOW_ANY_SFP) && | ||||
hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core1 || | hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core1 || | ||||
hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 || | hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 || | ||||
hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1)) { | hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1)) { | ||||
/* Make sure we're a supported PHY type */ | /* Make sure we're a supported PHY type */ | ||||
if (hw->phy.type == ixgbe_phy_sfp_intel) { | if (hw->phy.type == ixgbe_phy_sfp_intel) { | ||||
status = IXGBE_SUCCESS; | status = IXGBE_SUCCESS; | ||||
} else { | } else { | ||||
if (hw->allow_unsupported_sfp == true) { | if (hw->allow_unsupported_sfp == true) { | ||||
EWARN(hw, "WARNING: Intel (R) Network Connections are quality tested using Intel (R) Ethernet Optics. Using untested modules is not supported and may cause unstable operation or damage to the module or the adapter. Intel Corporation is not responsible for any harm caused by using untested modules.\n"); | EWARN(hw, | ||||
"WARNING: Intel (R) Network Connections are quality tested using Intel (R) Ethernet Optics. " | |||||
"Using untested modules is not supported and may cause unstable operation or damage to the module or the adapter. " | |||||
"Intel Corporation is not responsible for any harm caused by using untested modules.\n"); | |||||
status = IXGBE_SUCCESS; | status = IXGBE_SUCCESS; | ||||
} else { | } else { | ||||
DEBUGOUT("SFP+ module not supported\n"); | DEBUGOUT("SFP+ module not supported\n"); | ||||
hw->phy.type = | hw->phy.type = | ||||
ixgbe_phy_sfp_unsupported; | ixgbe_phy_sfp_unsupported; | ||||
status = IXGBE_ERR_SFP_NOT_SUPPORTED; | status = IXGBE_ERR_SFP_NOT_SUPPORTED; | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 236 Lines • ▼ Show 20 Lines | if (comp_codes_10g & (IXGBE_SFF_10GBASESR_CAPABLE | | ||||
ixgbe_get_device_caps(hw, &enforce_sfp); | ixgbe_get_device_caps(hw, &enforce_sfp); | ||||
if (!(enforce_sfp & IXGBE_DEVICE_CAPS_ALLOW_ANY_SFP)) { | if (!(enforce_sfp & IXGBE_DEVICE_CAPS_ALLOW_ANY_SFP)) { | ||||
/* Make sure we're a supported PHY type */ | /* Make sure we're a supported PHY type */ | ||||
if (hw->phy.type == ixgbe_phy_qsfp_intel) { | if (hw->phy.type == ixgbe_phy_qsfp_intel) { | ||||
status = IXGBE_SUCCESS; | status = IXGBE_SUCCESS; | ||||
} else { | } else { | ||||
if (hw->allow_unsupported_sfp == true) { | if (hw->allow_unsupported_sfp == true) { | ||||
EWARN(hw, "WARNING: Intel (R) Network Connections are quality tested using Intel (R) Ethernet Optics. Using untested modules is not supported and may cause unstable operation or damage to the module or the adapter. Intel Corporation is not responsible for any harm caused by using untested modules.\n"); | EWARN(hw, | ||||
"WARNING: Intel (R) Network Connections are quality tested using Intel (R) Ethernet Optics. " | |||||
"Using untested modules is not supported and may cause unstable operation or damage to the module or the adapter. " | |||||
"Intel Corporation is not responsible for any harm caused by using untested modules.\n"); | |||||
status = IXGBE_SUCCESS; | status = IXGBE_SUCCESS; | ||||
} else { | } else { | ||||
DEBUGOUT("QSFP module not supported\n"); | DEBUGOUT("QSFP module not supported\n"); | ||||
hw->phy.type = | hw->phy.type = | ||||
ixgbe_phy_sfp_unsupported; | ixgbe_phy_sfp_unsupported; | ||||
status = IXGBE_ERR_SFP_NOT_SUPPORTED; | status = IXGBE_ERR_SFP_NOT_SUPPORTED; | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 765 Lines • ▼ Show 20 Lines | |||||
* | * | ||||
* Returns the I2C data bit value | * Returns the I2C data bit value | ||||
* Negates the I2C data output enable on X550 hardware. | * Negates the I2C data output enable on X550 hardware. | ||||
**/ | **/ | ||||
static bool ixgbe_get_i2c_data(struct ixgbe_hw *hw, u32 *i2cctl) | static bool ixgbe_get_i2c_data(struct ixgbe_hw *hw, u32 *i2cctl) | ||||
{ | { | ||||
u32 data_oe_bit = IXGBE_I2C_DATA_OE_N_EN_BY_MAC(hw); | u32 data_oe_bit = IXGBE_I2C_DATA_OE_N_EN_BY_MAC(hw); | ||||
bool data; | bool data; | ||||
UNREFERENCED_1PARAMETER(hw); | |||||
DEBUGFUNC("ixgbe_get_i2c_data"); | DEBUGFUNC("ixgbe_get_i2c_data"); | ||||
if (data_oe_bit) { | if (data_oe_bit) { | ||||
*i2cctl |= data_oe_bit; | *i2cctl |= data_oe_bit; | ||||
IXGBE_WRITE_REG(hw, IXGBE_I2CCTL_BY_MAC(hw), *i2cctl); | IXGBE_WRITE_REG(hw, IXGBE_I2CCTL_BY_MAC(hw), *i2cctl); | ||||
IXGBE_WRITE_FLUSH(hw); | IXGBE_WRITE_FLUSH(hw); | ||||
usec_delay(IXGBE_I2C_T_FALL); | usec_delay(IXGBE_I2C_T_FALL); | ||||
▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines |