mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 05:08:41 +07:00
net: stmmac: set speed at SPEED_UNKNOWN in case of broken speed
In case of invalid speed given, stmmac_adjust_link() still record it as current speed. This patch modify the default case to set speed as SPEED_UNKNOWN if not 10/100/1000. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Reviewed-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
bd00632c52
commit
688495b10b
@ -739,6 +739,7 @@ static void stmmac_adjust_link(struct net_device *dev)
|
|||||||
default:
|
default:
|
||||||
netif_warn(priv, link, priv->dev,
|
netif_warn(priv, link, priv->dev,
|
||||||
"broken speed: %d\n", phydev->speed);
|
"broken speed: %d\n", phydev->speed);
|
||||||
|
phydev->speed = SPEED_UNKNOWN;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user