ixgbe/base: fix X550 CS4227 address
[dpdk.git] / lib / librte_pmd_ixgbe / ixgbe / ixgbe_x550.c
index bd31187..cad3bcd 100644 (file)
@@ -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;
 }
 
@@ -1063,6 +1067,8 @@ s32 ixgbe_setup_kr_x550em(struct ixgbe_hw *hw)
        status = ixgbe_read_iosf_sb_reg_x550(hw,
                IXGBE_KRM_LINK_CTRL_1(hw->phy.lan_id),
                IXGBE_SB_IOSF_TARGET_KR_PHY, &reg_val);
+       if (status)
+               return status;
 
        reg_val |= IXGBE_KRM_LINK_CTRL_1_TETH_AN_ENABLE;
        reg_val |= IXGBE_KRM_LINK_CTRL_1_TETH_AN_FEC_REQ;