diff mbox

[1/3] stmmac: fix_mac_speed is called during 10/100<->1000 speed changes

Message ID 1282632042-752-1-git-send-email-peppe.cavallaro@st.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Giuseppe CAVALLARO Aug. 24, 2010, 6:40 a.m. UTC
From: Pawel Moll <pawel.moll@st.com>

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>
---
 drivers/net/stmmac/stmmac_main.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Comments

David Miller Aug. 25, 2010, 11:30 p.m. UTC | #1
From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Date: Tue, 24 Aug 2010 08:40:40 +0200

> From: Pawel Moll <pawel.moll@st.com>
> 
> 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>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/stmmac/stmmac_main.c b/drivers/net/stmmac/stmmac_main.c
index bbb7951..86b6c69 100644
--- a/drivers/net/stmmac/stmmac_main.c
+++ b/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: