Skip to contentSkip to conversation

net: Implenent ethtool::nway_reset for a few drivers

PATCH In review Florian Fainelli 4 participants 9 messages Nov 15, 2016 – Nov 17, 2016

Subsystems (5)
lore
Share & tools
lore
#1 lore raw

PATCH 1/5 net: stmmac: Implement ethtool::nway_reset

In reply to Florian Fainelli

Utilize the generic phy_ethtool_nway_reset() helper function to implement an autonegotiation restart.

---
 drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +1 -0
index 3fe9340b748f..0290d52330da 100644
@@ -870,6 +870,7 @@ static const struct ethtool_ops stmmac_ethtool_ops = {
 	.get_regs = stmmac_ethtool_gregs,
 	.get_regs_len = stmmac_ethtool_get_regs_len,
 	.get_link = ethtool_op_get_link,
+	.nway_reset = phy_ethtool_nway_reset,
 	.get_pauseparam = stmmac_get_pauseparam,
 	.set_pauseparam = stmmac_set_pauseparam,
 	.get_ethtool_stats = stmmac_get_ethtool_stats,
Signature · 1 line
2.9.3
#3 lore raw

PATCH 2/5 net: ethoc: Implement ethtool::nway_reset

In reply to Florian Fainelli

Implement ethtool::nway_reset using phy_ethtool_nway_reset. We are already using dev->phydev all over the place so this comes for free.

---
 drivers/net/ethernet/ethoc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/ethoc.c +1 -0
index c044667a0a25..6456c180114b 100644
@@ -966,6 +966,7 @@ static int ethoc_set_ringparam(struct net_device *dev,
 const struct ethtool_ops ethoc_ethtool_ops = {
 	.get_regs_len = ethoc_get_regs_len,
 	.get_regs = ethoc_get_regs,
+	.nway_reset = phy_ethtool_nway_reset,
 	.get_link = ethtool_op_get_link,
 	.get_ringparam = ethoc_get_ringparam,
 	.set_ringparam = ethoc_set_ringparam,
Signature · 1 line
2.9.3
#5 lore raw

PATCH 3/5 net: ethernet: mvneta: Implement ethtool::nway_reset

In reply to Florian Fainelli

Implement ethtool::nway_reset using phy_ethtool_nway_reset. We are already using dev->phydev all over the place so this comes for free.

---
 drivers/net/ethernet/marvell/mvneta.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/marvell/mvneta.c +1 -0
index b85819ea8eea..87274d4ab102 100644
@@ -3811,6 +3811,7 @@ static const struct net_device_ops mvneta_netdev_ops = {
 };
 
 const struct ethtool_ops mvneta_eth_tool_ops = {
+	.nway_reset	= phy_ethtool_nway_reset,
 	.get_link       = ethtool_op_get_link,
 	.set_coalesce   = mvneta_ethtool_set_coalesce,
 	.get_coalesce   = mvneta_ethtool_get_coalesce,
Signature · 1 line
2.9.3
#6 lore raw

PATCH 4/5 net: ethernet: mvpp2: Implement ethtool::nway_reset

In reply to Florian Fainelli

Implement ethtool::nway_reset using phy_ethtool_nway_reset. We are already using dev->phydev all over the place so this comes for free.

---
 drivers/net/ethernet/marvell/mvpp2.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/marvell/mvpp2.c +1 -0
index c8bf155cad94..ee857868bea5 100644
@@ -5923,6 +5923,7 @@ static const struct net_device_ops mvpp2_netdev_ops = {
 };
 
 static const struct ethtool_ops mvpp2_eth_tool_ops = {
+	.nway_reset	= phy_ethtool_nway_reset,
 	.get_link	= ethtool_op_get_link,
 	.set_coalesce	= mvpp2_ethtool_set_coalesce,
 	.get_coalesce	= mvpp2_ethtool_get_coalesce,
Signature · 1 line
2.9.3
#7 lore raw

PATCH 5/5 net: ethernet: marvell: pxa168_eth: Implement ethtool::nway_reset

In reply to Florian Fainelli

Implement ethtool::nway_reset using phy_ethtool_nway_reset. We are already using dev->phydev all over the place so this comes for free.

---
 drivers/net/ethernet/marvell/pxa168_eth.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/marvell/pxa168_eth.c +1 -0
index b78a838f306c..3af2814ada23 100644
@@ -1393,6 +1393,7 @@ static void pxa168_get_drvinfo(struct net_device *dev,
 
 static const struct ethtool_ops pxa168_ethtool_ops = {
 	.get_drvinfo	= pxa168_get_drvinfo,
+	.nway_reset	= phy_ethtool_nway_reset,
 	.get_link	= ethtool_op_get_link,
 	.get_ts_info	= ethtool_op_get_ts_info,
 	.get_link_ksettings = pxa168_get_link_ksettings,
Signature · 1 line
2.9.3
#0 lore raw

cover net: Implenent ethtool::nway_reset for a few drivers

Hi all,

This patch series depends on "net: phy: Centralize auto-negotation restart" since it provides phy_ethtool_nway_reset as a helper function.

The drivers here already support PHYLIB, so there really is no reason why restarting auto-negotiation would not be possible with these.

Florian Fainelli (5):
net: stmmac: Implement ethtool::nway_reset
net: ethoc: Implement ethtool::nway_reset
net: ethernet: mvneta: Implement ethtool::nway_reset
net: ethernet: mvpp2: Implement ethtool::nway_reset
net: ethernet: marvell: pxa168_eth: Implement ethtool::nway_reset

 drivers/net/ethernet/ethoc.c                         | 1 +
 drivers/net/ethernet/marvell/mvneta.c                | 1 +
 drivers/net/ethernet/marvell/mvpp2.c                 | 1 +
 drivers/net/ethernet/marvell/pxa168_eth.c            | 1 +
 drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 1 +
 5 files changed, 5 insertions(+)
Signature · 1 line
2.9.3
maintainer
#8 lore raw
In reply to Florian Fainelli

From: Florian Fainelli <[email protected]>
Date: Tue, 15 Nov 2016 11:19:44 -0800

Quoted 5 lines

This patch series depends on "net: phy: Centralize auto-negotation restart" since it provides phy_ethtool_nway_reset as a helper function.

The drivers here already support PHYLIB, so there really is no reason why restarting auto-negotiation would not be possible with these.

Series applied, thanks Florian.

Acked-by on v1 1/5
#2 lore raw

Re: [PATCH net-next 1/5] net: stmmac: Implement ethtool::nway_reset

In reply to Florian Fainelli
Quoted 4 lines · Florian Fainelli

Utilize the generic phy_ethtool_nway_reset() helper function to implement an autonegotiation restart.

Quoted 17 lines
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +1 -0
index 3fe9340b748f..0290d52330da 100644
@@ -870,6 +870,7 @@ static const struct ethtool_ops stmmac_ethtool_ops = {
 	.get_regs = stmmac_ethtool_gregs,
 	.get_regs_len = stmmac_ethtool_get_regs_len,
 	.get_link = ethtool_op_get_link,
+	.nway_reset = phy_ethtool_nway_reset,
 	.get_pauseparam = stmmac_get_pauseparam,
 	.set_pauseparam = stmmac_set_pauseparam,
 	.get_ethtool_stats = stmmac_get_ethtool_stats,