Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -4554,20 +4554,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)