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

Commit c5b9b4e4 authored by Srinivas Kandagatla's avatar Srinivas Kandagatla Committed by David S. Miller
Browse files

stmmac: fix advertising 1000Base capabilties for non GMII iface



This patch fixes the way to stop the 1000Base advertising
capabilties for non GMII interfaces.

Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@st.com>
Acked-by: default avatarGiuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bbc17546
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -321,12 +321,10 @@ static int stmmac_init_phy(struct net_device *dev)
	}

	/* Stop Advertising 1000BASE Capability if interface is not GMII */
	if ((interface) && ((interface == PHY_INTERFACE_MODE_MII) ||
	    (interface == PHY_INTERFACE_MODE_RMII))) {
		phydev->supported &= (PHY_BASIC_FEATURES | SUPPORTED_Pause |
				      SUPPORTED_Asym_Pause);
		phydev->advertising = phydev->supported;
	}
	if ((interface == PHY_INTERFACE_MODE_MII) ||
	    (interface == PHY_INTERFACE_MODE_RMII))
		phydev->advertising &= ~(SUPPORTED_1000baseT_Half |
					 SUPPORTED_1000baseT_Full);

	/*
	 * Broken HW is sometimes missing the pull-up resistor on the