ixgbe: fix 82598 SFP initialization after driver load.
If we loaded the driver with out a SFP module plugged in it would leave it in a state that make it later unable to link when a module was plugged in. This patch corrects that by: ixgbe_probe() - moving the check for IXGBE_ERR_SFP_NOT_PRESENT from after get_invariants() to after reset_hw() as now reset_hw() is where this condition will be indentified. ixgbe_reset_hw_82598() - Enable this function to now return IXGBE_ERR_SFP_NOT_PRESENT. ixgbe_identify_sfp_module_generic() - This where the lack of SFP module is detected. Modifications are added to allow a different return value for modules that just haven't been plugged in yet. Other functions were updated to allow correct logging. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
f7c86a3252
commit
8ca783ab78
@ -530,11 +530,22 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
|
||||
u8 cable_tech = 0;
|
||||
u16 enforce_sfp = 0;
|
||||
|
||||
if (hw->mac.ops.get_media_type(hw) != ixgbe_media_type_fiber) {
|
||||
hw->phy.sfp_type = ixgbe_sfp_type_not_present;
|
||||
status = IXGBE_ERR_SFP_NOT_PRESENT;
|
||||
goto out;
|
||||
}
|
||||
|
||||
status = hw->phy.ops.read_i2c_eeprom(hw, IXGBE_SFF_IDENTIFIER,
|
||||
&identifier);
|
||||
|
||||
if (status == IXGBE_ERR_SFP_NOT_PRESENT) {
|
||||
if (status == IXGBE_ERR_SFP_NOT_PRESENT || status == IXGBE_ERR_I2C) {
|
||||
status = IXGBE_ERR_SFP_NOT_PRESENT;
|
||||
hw->phy.sfp_type = ixgbe_sfp_type_not_present;
|
||||
if (hw->phy.type != ixgbe_phy_nl) {
|
||||
hw->phy.id = 0;
|
||||
hw->phy.type = ixgbe_phy_unknown;
|
||||
}
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user