summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2015-10-01 19:40:31 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2017-01-05 22:38:21 +0000
commit8ab2f2d8ac1906e6b22fc96517605bc5413ae16e (patch)
treea80e353dea4a3e18c9b8b53c3f65cbe80baf4eee
parent5fbad84dd18ced0da44831f5b03b130036f6ebab (diff)
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 <rmk+kernel@arm.linux.org.uk>
-rw-r--r--drivers/net/ethernet/marvell/mvneta.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 2adcfce67e30..7e44453ff043 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -3600,6 +3600,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)
@@ -3863,6 +3870,7 @@ static const struct net_device_ops mvneta_netdev_ops = {
const struct ethtool_ops mvneta_eth_tool_ops = {
.get_link = ethtool_op_get_link,
+ .nway_reset = mvneta_ethtool_nway_reset,
.set_coalesce = mvneta_ethtool_set_coalesce,
.get_coalesce = mvneta_ethtool_get_coalesce,
.get_drvinfo = mvneta_ethtool_get_drvinfo,