Message ID | E1j7HrW-0004HW-Pz@rmk-PC.armlinux.org.uk |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
Series | dpaa2-eth: add support for nway reset | expand |
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
> 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
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.
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,
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(+)