Skip to content

Commit 2e6af0f

Browse files
Russell Kingdavem330
authored andcommitted
dpaa2-eth: add support for nway reset
Add support for ethtool -r so that PHY negotiation can be restarted. Signed-off-by: Russell King <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Acked-by: Ioana Ciornei <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 4a84182 commit 2e6af0f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,16 @@ static void dpaa2_eth_get_drvinfo(struct net_device *net_dev,
7979
sizeof(drvinfo->bus_info));
8080
}
8181

82+
static int dpaa2_eth_nway_reset(struct net_device *net_dev)
83+
{
84+
struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
85+
86+
if (priv->mac)
87+
return phylink_ethtool_nway_reset(priv->mac->phylink);
88+
89+
return -EOPNOTSUPP;
90+
}
91+
8292
static int
8393
dpaa2_eth_get_link_ksettings(struct net_device *net_dev,
8494
struct ethtool_link_ksettings *link_settings)
@@ -761,6 +771,7 @@ static int dpaa2_eth_get_ts_info(struct net_device *dev,
761771

762772
const struct ethtool_ops dpaa2_ethtool_ops = {
763773
.get_drvinfo = dpaa2_eth_get_drvinfo,
774+
.nway_reset = dpaa2_eth_nway_reset,
764775
.get_link = ethtool_op_get_link,
765776
.get_link_ksettings = dpaa2_eth_get_link_ksettings,
766777
.set_link_ksettings = dpaa2_eth_set_link_ksettings,

0 commit comments

Comments
 (0)