145-net-mvneta-add-module-EEPROM-reading-support.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. From 665e1fe77dedcfc6b5669214ebfd252c803290d4 Mon Sep 17 00:00:00 2001
  2. From: Russell King <rmk+kernel@arm.linux.org.uk>
  3. Date: Thu, 1 Oct 2015 23:32:39 +0100
  4. Subject: [PATCH 733/744] net: mvneta: add module EEPROM reading support
  5. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  6. ---
  7. drivers/net/ethernet/marvell/mvneta.c | 18 ++++++++++++++++++
  8. 1 file changed, 18 insertions(+)
  9. --- a/drivers/net/ethernet/marvell/mvneta.c
  10. +++ b/drivers/net/ethernet/marvell/mvneta.c
  11. @@ -3911,6 +3911,22 @@ static int mvneta_ethtool_get_rxfh(struc
  12. return 0;
  13. }
  14. +static int mvneta_ethtool_get_module_info(struct net_device *dev,
  15. + struct ethtool_modinfo *modinfo)
  16. +{
  17. + struct mvneta_port *pp = netdev_priv(dev);
  18. +
  19. + return phylink_ethtool_get_module_info(pp->phylink, modinfo);
  20. +}
  21. +
  22. +static int mvneta_ethtool_get_module_eeprom(struct net_device *dev,
  23. + struct ethtool_eeprom *ee, u8 *buf)
  24. +{
  25. + struct mvneta_port *pp = netdev_priv(dev);
  26. +
  27. + return phylink_ethtool_get_module_eeprom(pp->phylink, ee, buf);
  28. +}
  29. +
  30. static int mvneta_ethtool_get_eee(struct net_device *dev,
  31. struct ethtool_eee *eee)
  32. {
  33. @@ -3983,6 +3999,8 @@ const struct ethtool_ops mvneta_eth_tool
  34. .get_rxnfc = mvneta_ethtool_get_rxnfc,
  35. .get_rxfh = mvneta_ethtool_get_rxfh,
  36. .set_rxfh = mvneta_ethtool_set_rxfh,
  37. + .get_module_info = mvneta_ethtool_get_module_info,
  38. + .get_module_eeprom = mvneta_ethtool_get_module_eeprom,
  39. .get_eee = mvneta_ethtool_get_eee,
  40. .set_eee = mvneta_ethtool_set_eee,
  41. };