Browse Source

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: Pawel Moll <pawel.moll@st.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pawel Moll 15 năm trước cách đây
mục cha
commit
219dd1132a
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      drivers/net/stmmac/stmmac_main.c

+ 3 - 0
drivers/net/stmmac/stmmac_main.c

@@ -238,6 +238,9 @@ static void stmmac_adjust_link(struct net_device *dev)
 			case 1000:
 				if (likely(priv->is_gmac))
 					ctrl &= ~priv->hw->link.port;
+				if (likely(priv->fix_mac_speed))
+					priv->fix_mac_speed(priv->bsp_priv,
+							    phydev->speed);
 				break;
 			case 100:
 			case 10: