stmmac: fix_mac_speed is called during 10/100<->1000 speed changes
authorPawel Moll <pawel.moll@st.com>
Mon, 23 Aug 2010 20:40:40 +0000 (20:40 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Aug 2010 23:30:50 +0000 (16:30 -0700)
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>
drivers/net/stmmac/stmmac_main.c

index bbb7951b9c4c34bb3992deed9c7a8e84ff52f68e..86b6c69c068ca7ce08e6dfb1bc4a0da2cbe4a7ee 100644 (file)
@@ -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: