Skip to content

Commit f164b84

Browse files
mdrustadJeff Kirsher
authored andcommitted
ixgbe: Prevent KR PHY reset in ixgbe_init_phy_ops_x550em
This patch removes KR PHY reset from ixgbe_init_phy_ops_x550em, since this function is meant to initialize function pointers for the detected PHY type. Internal PHY reset was moved to ixgbe_setup_internal_phy_t_x550em which will now detect which mode the internal PHY operates in and set it up as required. Signed-off-by: Mark Rustad <[email protected]> Tested-by: Darin Miller <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 6f24e5d commit f164b84

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,6 +1727,12 @@ static s32 ixgbe_setup_internal_phy_t_x550em(struct ixgbe_hw *hw)
17271727
if (hw->mac.ops.get_media_type(hw) != ixgbe_media_type_copper)
17281728
return IXGBE_ERR_CONFIG;
17291729

1730+
if (hw->phy.nw_mng_if_sel & IXGBE_NW_MNG_IF_SEL_INT_PHY_MODE) {
1731+
speed = IXGBE_LINK_SPEED_10GB_FULL |
1732+
IXGBE_LINK_SPEED_1GB_FULL;
1733+
return ixgbe_setup_kr_speed_x550em(hw, speed);
1734+
}
1735+
17301736
/* If link is not up, then there is no setup necessary so return */
17311737
status = ixgbe_ext_phy_t_x550em_get_link(hw, &link_up);
17321738
if (status)
@@ -1931,7 +1937,6 @@ static s32 ixgbe_enter_lplu_t_x550em(struct ixgbe_hw *hw)
19311937
static s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw)
19321938
{
19331939
struct ixgbe_phy_info *phy = &hw->phy;
1934-
ixgbe_link_speed speed;
19351940
s32 ret_val;
19361941

19371942
hw->mac.ops.set_lan_id(hw);
@@ -1944,10 +1949,6 @@ static s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw)
19441949
* to determine internal PHY mode.
19451950
*/
19461951
phy->nw_mng_if_sel = IXGBE_READ_REG(hw, IXGBE_NW_MNG_IF_SEL);
1947-
if (phy->nw_mng_if_sel & IXGBE_NW_MNG_IF_SEL_INT_PHY_MODE) {
1948-
speed = IXGBE_LINK_SPEED_10GB_FULL |
1949-
IXGBE_LINK_SPEED_1GB_FULL;
1950-
}
19511952
}
19521953

19531954
/* Identify the PHY or SFP module */
@@ -1979,14 +1980,8 @@ static s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw)
19791980
/* If internal link mode is XFI, then setup iXFI internal link,
19801981
* else setup KR now.
19811982
*/
1982-
if (!(phy->nw_mng_if_sel & IXGBE_NW_MNG_IF_SEL_INT_PHY_MODE)) {
1983-
phy->ops.setup_internal_link =
1984-
ixgbe_setup_internal_phy_t_x550em;
1985-
} else {
1986-
speed = IXGBE_LINK_SPEED_10GB_FULL |
1987-
IXGBE_LINK_SPEED_1GB_FULL;
1988-
ret_val = ixgbe_setup_kr_speed_x550em(hw, speed);
1989-
}
1983+
phy->ops.setup_internal_link =
1984+
ixgbe_setup_internal_phy_t_x550em;
19901985

19911986
/* setup SW LPLU only for first revision */
19921987
if (!(IXGBE_FUSES0_REV1 & IXGBE_READ_REG(hw,

0 commit comments

Comments
 (0)