From 1679aca94c98f71c352ba6ed196e342c6ea26f1d Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 1 Oct 2015 19:40:31 +0100 Subject: net: mvneta: add nway_reset support Add ethtool nway_reset support to mvneta via phylink, so that userspace can request the link in whatever mode to be renegotiated via ethtool -r ethX. Signed-off-by: Russell King --- drivers/net/ethernet/marvell/mvneta.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index 908606a414e5..a7975314f8c3 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -3680,6 +3680,13 @@ mvneta_ethtool_get_link_ksettings(struct net_device *ndev, return phylink_ethtool_ksettings_get(pp->phylink, cmd); } +static int mvneta_ethtool_nway_reset(struct net_device *dev) +{ + struct mvneta_port *pp = netdev_priv(dev); + + return phylink_ethtool_nway_reset(pp->phylink); +} + /* Set interrupt coalescing for ethtools */ static int mvneta_ethtool_set_coalesce(struct net_device *dev, struct ethtool_coalesce *c) @@ -3951,7 +3958,7 @@ static const struct net_device_ops mvneta_netdev_ops = { }; const struct ethtool_ops mvneta_eth_tool_ops = { - .nway_reset = phy_ethtool_nway_reset, + .nway_reset = mvneta_ethtool_nway_reset, .get_link = ethtool_op_get_link, .set_coalesce = mvneta_ethtool_set_coalesce, .get_coalesce = mvneta_ethtool_get_coalesce, -- cgit