From: Ouyang Changchun Date: Thu, 12 Feb 2015 12:00:38 +0000 (+0800) Subject: ixgbe/base: fix X550 CS4227 address X-Git-Tag: spdx-start~9287 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=585abe0bb1b8c994d6c72a5e189c99f8f07a6de3;p=dpdk.git ixgbe/base: fix X550 CS4227 address Update the address of IXGBE_CS4227. Signed-off-by: Changchun Ouyang Acked-by: Jijiang Liu --- diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h index 9a408ef70b..892517c99d 100644 --- a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h +++ b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h @@ -82,7 +82,7 @@ POSSIBILITY OF SUCH DAMAGE. #define IXGBE_I2C_EEPROM_STATUS_FAIL 0x2 #define IXGBE_I2C_EEPROM_STATUS_IN_PROGRESS 0x3 -#define IXGBE_CS4227 0x9E /* CS4227 address */ +#define IXGBE_CS4227 0xBE /* CS4227 address */ #define IXGBE_CS4227_SPARE24_LSB 0x12B0 /* Reg to program EDC */ #define IXGBE_CS4227_EDC_MODE_CX1 0x0002 #define IXGBE_CS4227_EDC_MODE_SR 0x0004 diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c index 763fc46270..cad3bcd0e0 100644 --- a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c +++ b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c @@ -820,7 +820,7 @@ s32 ixgbe_setup_sfp_modules_X550em(struct ixgbe_hw *hw) hw->phy.ops.reset = NULL; /* The CS4227 slice address is the base address + the port-pair reg - * offset. I.e. Slice 0 = 0x0000 and slice 1 = 0x1000. + * offset. I.e. Slice 0 = 0x12B0 and slice 1 = 0x22B0. */ reg_slice = IXGBE_CS4227_SPARE24_LSB + (hw->phy.lan_id << 12); @@ -833,6 +833,10 @@ s32 ixgbe_setup_sfp_modules_X550em(struct ixgbe_hw *hw) ret_val = ixgbe_write_i2c_combined(hw, IXGBE_CS4227, reg_slice, edc_mode); + if (ret_val != IXGBE_SUCCESS) + ret_val = ixgbe_write_i2c_combined(hw, 0x80, reg_slice, + edc_mode); + return ret_val; }