net/ixgbe/base: support busy SGMII register reads
authorWei Dai <wei.dai@intel.com>
Wed, 21 Dec 2016 09:48:01 +0000 (17:48 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 17 Jan 2017 18:40:51 +0000 (19:40 +0100)
Read and store NW_MNG_IF_SEL register because register fields are
used to determine SGMII link for busy SGMII register reads.

Signed-off-by: Wei Dai <wei.dai@intel.com>
drivers/net/ixgbe/base/ixgbe_x550.c

index c7ccd81..0011f21 100644 (file)
@@ -2444,6 +2444,9 @@ s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw)
 
        DEBUGFUNC("ixgbe_init_phy_ops_X550em");
 
+       hw->mac.ops.set_lan_id(hw);
+       ixgbe_read_mng_if_sel_x550em(hw);
+
        if (hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber) {
                phy->phy_semaphore_mask = IXGBE_GSSR_SHARED_I2C_SM;
                ixgbe_setup_mux_ctl(hw);
@@ -2483,7 +2486,8 @@ s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw)
 
        /* Identify the PHY or SFP module */
        ret_val = phy->ops.identify(hw);
-       if (ret_val == IXGBE_ERR_SFP_NOT_SUPPORTED)
+       if (ret_val == IXGBE_ERR_SFP_NOT_SUPPORTED ||
+           ret_val == IXGBE_ERR_PHY_ADDR_INVALID)
                return ret_val;
 
        /* Setup function pointers based on detected hardware */