diff options
| author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2025-09-16 22:46:41 +0100 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-09-22 16:05:14 -0700 |
| commit | ddae6127afbba46e32af3b31eb7bba939e1fad96 (patch) | |
| tree | c45401e1c669adf6e2d7bf524827b870c82cef1a /include/linux | |
| parent | a571f08d3db215dd6ec294d8faac8cc4184bc4e4 (diff) | |
net: sfp: pre-parse the module support
Pre-parse the module support on insert rather than when the upstream
requests the data. This will allow more flexible and extensible
parsing.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1uydVZ-000000061WE-2pXD@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/sfp.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/sfp.h b/include/linux/sfp.h index 60c65cea74f6..5fb59cf49882 100644 --- a/include/linux/sfp.h +++ b/include/linux/sfp.h @@ -522,6 +522,28 @@ struct ethtool_modinfo; struct sfp_bus; /** + * struct sfp_module_caps - sfp module capabilities + * @interfaces: bitmap of interfaces that the module may support + * @link_modes: bitmap of ethtool link modes that the module may support + */ +struct sfp_module_caps { + DECLARE_PHY_INTERFACE_MASK(interfaces); + __ETHTOOL_DECLARE_LINK_MODE_MASK(link_modes); + /** + * @may_have_phy: indicate whether the module may have an ethernet PHY + * There is no way to be sure that a module has a PHY as the EEPROM + * doesn't contain this information. When set, this does not mean that + * the module definitely has a PHY. + */ + bool may_have_phy; + /** + * @port: one of ethtool %PORT_* definitions, parsed from the module + * EEPROM, or %PORT_OTHER if the port type is not known. + */ + u8 port; +}; + +/** * struct sfp_upstream_ops - upstream operations structure * @attach: called when the sfp socket driver is bound to the upstream * (mandatory). |
