[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1305268085-603-1-git-send-email-peppe.cavallaro@st.com>
Date: Fri, 13 May 2011 08:28:04 +0200
From: Giuseppe CAVALLARO <peppe.cavallaro@...com>
To: netdev@...r.kernel.org
Cc: David Decotigny <decot@...gle.com>,
Giuseppe Cavallaro <peppe.cavallaro@...com>
Subject: [net-next 1/2 (V2)] stmmac: don't go through ethtool to start auto-negotiation
From: David Decotigny <decot@...gle.com>
The driver used to call phy's ethtool configuration routine to start
auto-negotiation. This change has it call directly phy's routine to
start auto-negotiation.
The initial version was hiding phy_start_aneg() return value,
this patch returns it (<0 upon error).
Tested: module compiles, tested on STM HDK7108 STB.
Signed-off-by: David Decotigny <decot@...gle.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@...com>
---
drivers/net/stmmac/stmmac_ethtool.c | 13 ++-----------
1 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/drivers/net/stmmac/stmmac_ethtool.c b/drivers/net/stmmac/stmmac_ethtool.c
index 6f5aaeb..9c05cf0 100644
--- a/drivers/net/stmmac/stmmac_ethtool.c
+++ b/drivers/net/stmmac/stmmac_ethtool.c
@@ -236,17 +236,8 @@ stmmac_set_pauseparam(struct net_device *netdev,
priv->flow_ctrl = new_pause;
if (phy->autoneg) {
- if (netif_running(netdev)) {
- struct ethtool_cmd cmd = { .cmd = ETHTOOL_SSET };
- /* auto-negotiation automatically restarted */
- cmd.supported = phy->supported;
- cmd.advertising = phy->advertising;
- cmd.autoneg = phy->autoneg;
- ethtool_cmd_speed_set(&cmd, phy->speed);
- cmd.duplex = phy->duplex;
- cmd.phy_address = phy->addr;
- ret = phy_ethtool_sset(phy, &cmd);
- }
+ if (netif_running(netdev))
+ ret = phy_start_aneg(phy);
} else
priv->hw->mac->flow_ctrl(priv->ioaddr, phy->duplex,
priv->flow_ctrl, priv->pause);
--
1.7.4.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists