2017-02-06 10:46:48 +00:00
|
|
|
From: Russell King <rmk+kernel@arm.linux.org.uk>
|
|
|
|
Date: Thu, 1 Oct 2015 19:40:31 +0100
|
|
|
|
Subject: [PATCH] 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>
|
|
|
|
---
|
|
|
|
|
|
|
|
--- a/drivers/net/ethernet/marvell/mvneta.c
|
|
|
|
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
2017-12-30 14:22:36 +00:00
|
|
|
@@ -3619,6 +3619,13 @@ mvneta_ethtool_get_link_ksettings(struct
|
2017-02-06 10:46:48 +00:00
|
|
|
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)
|
2017-12-30 14:22:36 +00:00
|
|
|
@@ -3892,6 +3899,7 @@ static const struct net_device_ops mvnet
|
2017-02-06 10:46:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const struct ethtool_ops mvneta_eth_tool_ops = {
|
|
|
|
+ .nway_reset = mvneta_ethtool_nway_reset,
|
|
|
|
.get_link = ethtool_op_get_link,
|
|
|
|
.set_coalesce = mvneta_ethtool_set_coalesce,
|
|
|
|
.get_coalesce = mvneta_ethtool_get_coalesce,
|