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

Commit 5d0932a5 authored by Alexander Duyck's avatar Alexander Duyck Committed by David S. Miller
Browse files

igb: fix link reporting when using sgmii



When using sgmii the link was not being properly passed up to the driver
from the underlying link management functions.  This change corrects it so
that get_link_status is cleared when a link has been found.

Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ec54d7d6
Loading
Loading
Loading
Loading
+9 −2
Original line number Original line Diff line number Diff line
@@ -699,11 +699,18 @@ static s32 igb_check_for_link_82575(struct e1000_hw *hw)


	/* SGMII link check is done through the PCS register. */
	/* SGMII link check is done through the PCS register. */
	if ((hw->phy.media_type != e1000_media_type_copper) ||
	if ((hw->phy.media_type != e1000_media_type_copper) ||
	    (igb_sgmii_active_82575(hw)))
	    (igb_sgmii_active_82575(hw))) {
		ret_val = igb_get_pcs_speed_and_duplex_82575(hw, &speed,
		ret_val = igb_get_pcs_speed_and_duplex_82575(hw, &speed,
		                                             &duplex);
		                                             &duplex);
	else
		/*
		 * Use this flag to determine if link needs to be checked or
		 * not.  If  we have link clear the flag so that we do not
		 * continue to check for link.
		 */
		hw->mac.get_link_status = !hw->mac.serdes_has_link;
	} else {
		ret_val = igb_check_for_copper_link(hw);
		ret_val = igb_check_for_copper_link(hw);
	}


	return ret_val;
	return ret_val;
}
}