Skip to content

Commit

Permalink
ixgbe: Set lan_id before first I2C eeprom access
Browse files Browse the repository at this point in the history
The lan_id is being set after a previous I2C eeprom access which
makes no sense because it needs to be set before any access. Move
the setting to before the access.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Mark Rustad authored and Jeff Kirsher committed Sep 22, 2015
1 parent bb5ce9a commit da4ea4b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
Original file line number Diff line number Diff line change
@@ -1171,16 +1171,16 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
return IXGBE_ERR_SFP_NOT_PRESENT;
}

/* LAN ID is needed for sfp_type determination */
hw->mac.ops.set_lan_id(hw);

status = hw->phy.ops.read_i2c_eeprom(hw,
IXGBE_SFF_IDENTIFIER,
&identifier);

if (status)
goto err_read_i2c_eeprom;

/* 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;
return IXGBE_ERR_SFP_NOT_SUPPORTED;

0 comments on commit da4ea4b

Please sign in to comment.