aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEd Swierk <eswierk@skyportsystems.com>2015-01-02 20:27:56 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-06 17:16:55 -0500
commit2f4383667d57d1c719070db86b14277277752841 (patch)
treeb9679f46faa428c0090cf8f63bed02130b863243 /include
parent53831aa12538f8753fb77b7ab6408cce54973b30 (diff)
ethtool: Extend ethtool plugin module eeprom API to phylib
This patch extends the ethtool plugin module eeprom API to support cards whose phy support is delegated to a separate driver. The handlers for ETHTOOL_GMODULEINFO and ETHTOOL_GMODULEEEPROM call the module_info and module_eeprom functions if the phy driver provides them; otherwise the handlers call the equivalent ethtool_ops functions provided by network drivers with built-in phy support. Signed-off-by: Ed Swierk <eswierk@skyportsystems.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/phy.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 22af8f8f5802..9c189a1fa3a2 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -565,6 +565,15 @@ struct phy_driver {
565 void (*write_mmd_indirect)(struct phy_device *dev, int ptrad, 565 void (*write_mmd_indirect)(struct phy_device *dev, int ptrad,
566 int devnum, int regnum, u32 val); 566 int devnum, int regnum, u32 val);
567 567
568 /* Get the size and type of the eeprom contained within a plug-in
569 * module */
570 int (*module_info)(struct phy_device *dev,
571 struct ethtool_modinfo *modinfo);
572
573 /* Get the eeprom information from the plug-in module */
574 int (*module_eeprom)(struct phy_device *dev,
575 struct ethtool_eeprom *ee, u8 *data);
576
568 struct device_driver driver; 577 struct device_driver driver;
569}; 578};
570#define to_phy_driver(d) container_of(d, struct phy_driver, driver) 579#define to_phy_driver(d) container_of(d, struct phy_driver, driver)