net: stmmac: Fixed ethool speed issue

Don't modify emac supported capabilities during
early ethernet boot up. Only update advertise values
otherwise speed can't be changed using ethtool.

Change-Id: Id25ddd17a81fefd4d17116f0ff7237272f2607c0
Signed-off-by: Suraj Jaiswal <jsuraj@codeaurora.org>
tirimbino
Suraj Jaiswal 5 years ago
parent c8980a4066
commit 6f671b0475
  1. 8
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

@ -1028,15 +1028,9 @@ static int stmmac_init_phy(struct net_device *dev)
phydev->speed = SPEED_100; phydev->speed = SPEED_100;
phydev->duplex = DUPLEX_FULL; phydev->duplex = DUPLEX_FULL;
phydev->supported =
SUPPORTED_100baseT_Full | SUPPORTED_TP | SUPPORTED_MII |
SUPPORTED_10baseT_Full;
phydev->supported &= ~SUPPORTED_Autoneg;
phydev->advertising = phydev->supported; phydev->advertising = phydev->supported;
phydev->advertising &= ~ADVERTISED_Autoneg; phydev->advertising &= ~(SUPPORTED_1000baseT_Full);
phy_set_max_speed(phydev, SPEED_100);
pr_info(" qcom-ethqos: %s early eth setting successful\n", pr_info(" qcom-ethqos: %s early eth setting successful\n",
__func__); __func__);

Loading…
Cancel
Save