From: Ouyang Changchun Date: Thu, 12 Feb 2015 12:00:59 +0000 (+0800) Subject: ixgbe/base: fix SFP probing X-Git-Tag: spdx-start~9295 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8dba79550ac3fc1bad4cf71eb9f02d1b20d50b7b;p=dpdk.git ixgbe/base: fix SFP probing LAN ID is needed for i2c access, so move it before reading I2C eeprom. Signed-off-by: Changchun Ouyang Acked-by: Jijiang Liu --- diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c index f799876dff..07ef83d545 100644 --- a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c +++ b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c @@ -1201,6 +1201,9 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) goto out; } + /* LAN ID is needed for I2C access */ + hw->mac.ops.set_lan_id(hw); + status = hw->phy.ops.read_i2c_eeprom(hw, IXGBE_SFF_IDENTIFIER, &identifier); @@ -1208,9 +1211,6 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) if (status != IXGBE_SUCCESS) 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; status = IXGBE_ERR_SFP_NOT_SUPPORTED;