diff options
author | Andrew Lunn <andrew@lunn.ch> | 2021-04-09 10:06:40 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-04-12 01:34:56 +0200 |
commit | d740513f05a24b1a46722325974223980f068728 (patch) | |
tree | 9b5eb129c83e0e4284a6dd5af52ad615e0b074cc /drivers/net/phy/sfp.h | |
parent | ethtool: Add fallback to get_module_eeprom from netlink command (diff) | |
download | linux-d740513f05a24b1a46722325974223980f068728.tar.xz linux-d740513f05a24b1a46722325974223980f068728.zip |
phy: sfp: add netlink SFP support to generic SFP code
The new netlink API for reading SFP data requires a new op to be
implemented. The idea of the new netlink SFP code is that userspace is
responsible to parsing the EEPROM data and requesting pages, rather
than have the kernel decide what pages are interesting and returning
them. This allows greater flexibility for newer formats.
Currently the generic SFP code only supports simple SFPs. Allow i2c
address 0x50 and 0x51 to be accessed with page and bank must always be
0. This interface will later be extended when for example QSFP support
is added.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Vladyslav Tarasiuk <vladyslavt@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/sfp.h')
-rw-r--r-- | drivers/net/phy/sfp.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/phy/sfp.h b/drivers/net/phy/sfp.h index b83f70526270..27226535c72b 100644 --- a/drivers/net/phy/sfp.h +++ b/drivers/net/phy/sfp.h @@ -14,6 +14,9 @@ struct sfp_socket_ops { int (*module_info)(struct sfp *sfp, struct ethtool_modinfo *modinfo); int (*module_eeprom)(struct sfp *sfp, struct ethtool_eeprom *ee, u8 *data); + int (*module_eeprom_by_page)(struct sfp *sfp, + const struct ethtool_module_eeprom *page, + struct netlink_ext_ack *extack); }; int sfp_add_phy(struct sfp_bus *bus, struct phy_device *phydev); |