422-net-mvneta-add-nway_reset-support.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. From: Russell King <[email protected]>
  2. Date: Thu, 1 Oct 2015 19:40:31 +0100
  3. Subject: [PATCH] net: mvneta: add nway_reset support
  4. Add ethtool nway_reset support to mvneta via phylink, so that userspace
  5. can request the link in whatever mode to be renegotiated via
  6. ethtool -r ethX.
  7. Signed-off-by: Russell King <[email protected]>
  8. ---
  9. --- a/drivers/net/ethernet/marvell/mvneta.c
  10. +++ b/drivers/net/ethernet/marvell/mvneta.c
  11. @@ -3616,6 +3616,13 @@ mvneta_ethtool_get_link_ksettings(struct
  12. return phylink_ethtool_ksettings_get(pp->phylink, cmd);
  13. }
  14. +static int mvneta_ethtool_nway_reset(struct net_device *dev)
  15. +{
  16. + struct mvneta_port *pp = netdev_priv(dev);
  17. +
  18. + return phylink_ethtool_nway_reset(pp->phylink);
  19. +}
  20. +
  21. /* Set interrupt coalescing for ethtools */
  22. static int mvneta_ethtool_set_coalesce(struct net_device *dev,
  23. struct ethtool_coalesce *c)
  24. @@ -3889,6 +3896,7 @@ static const struct net_device_ops mvnet
  25. };
  26. const struct ethtool_ops mvneta_eth_tool_ops = {
  27. + .nway_reset = mvneta_ethtool_nway_reset,
  28. .get_link = ethtool_op_get_link,
  29. .set_coalesce = mvneta_ethtool_set_coalesce,
  30. .get_coalesce = mvneta_ethtool_get_coalesce,