From: Michael Chan Date: Sat, 20 Feb 2016 00:43:20 +0000 (-0500) Subject: bnxt_en: Remove unnecessary call to update PHY settings. X-Git-Tag: v4.1.12-92~126^2~70 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d16f0c1e0158b4123e8168aa339674dfd2eb0754;p=users%2Fjedix%2Flinux-maple.git bnxt_en: Remove unnecessary call to update PHY settings. Orabug: 23221795 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: Michael Chan Signed-off-by: David S. Miller (cherry picked from commit de73018fb5474b33dc4f6d6b8d889e40232e325b) Signed-off-by: Brian Maly --- diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 781c6ead0221c..b29c81673389c 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -4573,20 +4573,18 @@ static int bnxt_update_phy_setting(struct bnxt *bp) if (!(link_info->autoneg & BNXT_AUTONEG_FLOW_CTRL) && link_info->force_pause_setting != link_info->req_flow_ctrl) update_pause = true; - if (link_info->req_duplex != link_info->duplex_setting) - update_link = true; if (!(link_info->autoneg & BNXT_AUTONEG_SPEED)) { if (BNXT_AUTO_MODE(link_info->auto_mode)) update_link = true; if (link_info->req_link_speed != link_info->force_link_speed) update_link = true; + if (link_info->req_duplex != link_info->duplex_setting) + update_link = true; } else { if (link_info->auto_mode == BNXT_LINK_AUTO_NONE) update_link = true; if (link_info->advertising != link_info->auto_link_speeds) update_link = true; - if (link_info->req_link_speed != link_info->auto_link_speed) - update_link = true; } if (update_link)