]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: phylink: restrict SFP interfaces to those that are supported
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 2 Jul 2025 09:44:24 +0000 (10:44 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 8 Jul 2025 02:02:36 +0000 (19:02 -0700)
commitff1fce1bdd7b96b6e84518c277569dabbfb18c7d
tree902c3672828cae6420bf1eb09c6f16eaae76a4ec
parent8d5d927d963b7db8e8c7cda572541f80a69272b0
net: phylink: restrict SFP interfaces to those that are supported

When configuring an optical SFP interface, restrict the bitmap of SFP
interfaces (pl->sfp_interfaces) to those that are supported by the
host, rather than calculating this in a local variable.

This will allow us to avoid recomputing this in the
phylink_ethtool_ksettings_set() path.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Tested-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/E1uWu0u-005KXc-A4@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/phylink.c