137-net-mvneta-add-nway_reset-support.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. From 244bee2889d08f876c64c335765a8ea6de0f5381 Mon Sep 17 00:00:00 2001
  2. From: Russell King <rmk+kernel@arm.linux.org.uk>
  3. Date: Thu, 1 Oct 2015 19:40:31 +0100
  4. Subject: [PATCH 725/744] net: mvneta: add nway_reset support
  5. Add ethtool nway_reset support to mvneta via phylink, so that userspace
  6. can request the link in whatever mode to be renegotiated via
  7. ethtool -r ethX.
  8. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  9. ---
  10. drivers/net/ethernet/marvell/mvneta.c | 8 ++++++++
  11. 1 file changed, 8 insertions(+)
  12. --- a/drivers/net/ethernet/marvell/mvneta.c
  13. +++ b/drivers/net/ethernet/marvell/mvneta.c
  14. @@ -3589,6 +3589,13 @@ int mvneta_ethtool_set_settings(struct n
  15. return phylink_ethtool_set_settings(pp->phylink, cmd);
  16. }
  17. +static int mvneta_ethtool_nway_reset(struct net_device *dev)
  18. +{
  19. + struct mvneta_port *pp = netdev_priv(dev);
  20. +
  21. + return phylink_ethtool_nway_reset(pp->phylink);
  22. +}
  23. +
  24. /* Set interrupt coalescing for ethtools */
  25. static int mvneta_ethtool_set_coalesce(struct net_device *dev,
  26. struct ethtool_coalesce *c)
  27. @@ -3853,6 +3860,7 @@ const struct ethtool_ops mvneta_eth_tool
  28. .get_link = ethtool_op_get_link,
  29. .get_settings = mvneta_ethtool_get_settings,
  30. .set_settings = mvneta_ethtool_set_settings,
  31. + .nway_reset = mvneta_ethtool_nway_reset,
  32. .set_coalesce = mvneta_ethtool_set_coalesce,
  33. .get_coalesce = mvneta_ethtool_get_coalesce,
  34. .get_drvinfo = mvneta_ethtool_get_drvinfo,