Commit de73018f authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

bnxt_en: Remove unnecessary call to update PHY settings.

Fix bnxt_update_phy_setting() to check the correct parameters when
determining whether to update the PHY.  Requested line speed/duplex should
only be checked for forced speed mode.  This avoids unnecessary link
interruptions when loading the driver.
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 035a1539
...@@ -4554,20 +4554,18 @@ static int bnxt_update_phy_setting(struct bnxt *bp) ...@@ -4554,20 +4554,18 @@ static int bnxt_update_phy_setting(struct bnxt *bp)
if (!(link_info->autoneg & BNXT_AUTONEG_FLOW_CTRL) && if (!(link_info->autoneg & BNXT_AUTONEG_FLOW_CTRL) &&
link_info->force_pause_setting != link_info->req_flow_ctrl) link_info->force_pause_setting != link_info->req_flow_ctrl)
update_pause = true; update_pause = true;
if (link_info->req_duplex != link_info->duplex_setting)
update_link = true;
if (!(link_info->autoneg & BNXT_AUTONEG_SPEED)) { if (!(link_info->autoneg & BNXT_AUTONEG_SPEED)) {
if (BNXT_AUTO_MODE(link_info->auto_mode)) if (BNXT_AUTO_MODE(link_info->auto_mode))
update_link = true; update_link = true;
if (link_info->req_link_speed != link_info->force_link_speed) if (link_info->req_link_speed != link_info->force_link_speed)
update_link = true; update_link = true;
if (link_info->req_duplex != link_info->duplex_setting)
update_link = true;
} else { } else {
if (link_info->auto_mode == BNXT_LINK_AUTO_NONE) if (link_info->auto_mode == BNXT_LINK_AUTO_NONE)
update_link = true; update_link = true;
if (link_info->advertising != link_info->auto_link_speeds) if (link_info->advertising != link_info->auto_link_speeds)
update_link = true; update_link = true;
if (link_info->req_link_speed != link_info->auto_link_speed)
update_link = true;
} }
if (update_link) if (update_link)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment