* [PATCH] dpaa2-eth: add support for nway reset
@ 2020-02-27 12:01 Russell King
2020-02-27 15:24 ` Andrew Lunn
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Russell King @ 2020-02-27 12:01 UTC (permalink / raw)
To: Ioana Ciornei; +Cc: David S. Miller, netdev
Add support for ethtool -r so that PHY negotiation can be restarted.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
index 96676abcebd5..94347c695233 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
@@ -79,6 +79,16 @@ static void dpaa2_eth_get_drvinfo(struct net_device *net_dev,
sizeof(drvinfo->bus_info));
}
+static int dpaa2_eth_nway_reset(struct net_device *net_dev)
+{
+ struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
+
+ if (priv->mac)
+ return phylink_ethtool_nway_reset(priv->mac->phylink);
+
+ return -EOPNOTSUPP;
+}
+
static int
dpaa2_eth_get_link_ksettings(struct net_device *net_dev,
struct ethtool_link_ksettings *link_settings)
@@ -761,6 +771,7 @@ static int dpaa2_eth_get_ts_info(struct net_device *dev,
const struct ethtool_ops dpaa2_ethtool_ops = {
.get_drvinfo = dpaa2_eth_get_drvinfo,
+ .nway_reset = dpaa2_eth_nway_reset,
.get_link = ethtool_op_get_link,
.get_link_ksettings = dpaa2_eth_get_link_ksettings,
.set_link_ksettings = dpaa2_eth_set_link_ksettings,
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] dpaa2-eth: add support for nway reset
2020-02-27 12:01 [PATCH] dpaa2-eth: add support for nway reset Russell King
@ 2020-02-27 15:24 ` Andrew Lunn
2020-02-27 16:04 ` Ioana Ciornei
2020-02-27 19:27 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2020-02-27 15:24 UTC (permalink / raw)
To: Russell King; +Cc: Ioana Ciornei, David S. Miller, netdev
On Thu, Feb 27, 2020 at 12:01:54PM +0000, Russell King wrote:
> Add support for ethtool -r so that PHY negotiation can be restarted.
>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] dpaa2-eth: add support for nway reset
2020-02-27 12:01 [PATCH] dpaa2-eth: add support for nway reset Russell King
2020-02-27 15:24 ` Andrew Lunn
@ 2020-02-27 16:04 ` Ioana Ciornei
2020-02-27 19:27 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Ioana Ciornei @ 2020-02-27 16:04 UTC (permalink / raw)
To: Russell King; +Cc: David S. Miller, netdev
> Subject: [PATCH] dpaa2-eth: add support for nway reset
>
> Add support for ethtool -r so that PHY negotiation can be restarted.
>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Acked-by: Ioana Ciornei <ioana.ciornei@nxp.com>
> ---
> drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
> b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
> index 96676abcebd5..94347c695233 100644
> --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
> +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
> @@ -79,6 +79,16 @@ static void dpaa2_eth_get_drvinfo(struct net_device
> *net_dev,
> sizeof(drvinfo->bus_info));
> }
>
> +static int dpaa2_eth_nway_reset(struct net_device *net_dev) {
> + struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
> +
> + if (priv->mac)
> + return phylink_ethtool_nway_reset(priv->mac->phylink);
> +
> + return -EOPNOTSUPP;
> +}
> +
> static int
> dpaa2_eth_get_link_ksettings(struct net_device *net_dev,
> struct ethtool_link_ksettings *link_settings) @@ -
> 761,6 +771,7 @@ static int dpaa2_eth_get_ts_info(struct net_device *dev,
>
> const struct ethtool_ops dpaa2_ethtool_ops = {
> .get_drvinfo = dpaa2_eth_get_drvinfo,
> + .nway_reset = dpaa2_eth_nway_reset,
> .get_link = ethtool_op_get_link,
> .get_link_ksettings = dpaa2_eth_get_link_ksettings,
> .set_link_ksettings = dpaa2_eth_set_link_ksettings,
> --
> 2.20.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dpaa2-eth: add support for nway reset
2020-02-27 12:01 [PATCH] dpaa2-eth: add support for nway reset Russell King
2020-02-27 15:24 ` Andrew Lunn
2020-02-27 16:04 ` Ioana Ciornei
@ 2020-02-27 19:27 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2020-02-27 19:27 UTC (permalink / raw)
To: rmk+kernel; +Cc: ioana.ciornei, netdev
From: Russell King <rmk+kernel@armlinux.org.uk>
Date: Thu, 27 Feb 2020 12:01:54 +0000
> Add support for ethtool -r so that PHY negotiation can be restarted.
>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-02-27 19:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-27 12:01 [PATCH] dpaa2-eth: add support for nway reset Russell King
2020-02-27 15:24 ` Andrew Lunn
2020-02-27 16:04 ` Ioana Ciornei
2020-02-27 19:27 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.