Commit 219dd113 authored by Pawel Moll's avatar Pawel Moll Committed by David S. Miller

stmmac: fix_mac_speed is called during 10/100<->1000 speed changes

This patch modifies the stmmac_adjust_link() function so the
fix_mac_speed() is called not only when link speed is changing
between 10 and 100 Mbps (as required in RMII mode) but also
for 1000 Mbps.
Signed-off-by: default avatarPawel Moll <pawel.moll@st.com>
Signed-off-by: default avatarGiuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c6a056a3
...@@ -238,6 +238,9 @@ static void stmmac_adjust_link(struct net_device *dev) ...@@ -238,6 +238,9 @@ static void stmmac_adjust_link(struct net_device *dev)
case 1000: case 1000:
if (likely(priv->is_gmac)) if (likely(priv->is_gmac))
ctrl &= ~priv->hw->link.port; ctrl &= ~priv->hw->link.port;
if (likely(priv->fix_mac_speed))
priv->fix_mac_speed(priv->bsp_priv,
phydev->speed);
break; break;
case 100: case 100:
case 10: case 10:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment