net: sfp: allow use 2500base-X for 2500base-T modules

Allow use of 2500base-X interface mode for PHY modules that support
2500base-T.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Daniel Machon <daniel.machon@microchip.com>
Link: https://lore.kernel.org/r/E1s15rv-00AHyk-5S@rmk-PC.armlinux.org.uk
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
Russell King (Oracle) 2024-04-28 15:51:07 +01:00 committed by Paolo Abeni
parent 0041cd3799
commit 8a3163b671

View File

@ -373,7 +373,8 @@ phy_interface_t sfp_select_interface(struct sfp_bus *bus,
if (phylink_test(link_modes, 5000baseT_Full))
return PHY_INTERFACE_MODE_5GBASER;
if (phylink_test(link_modes, 2500baseX_Full))
if (phylink_test(link_modes, 2500baseX_Full) ||
phylink_test(link_modes, 2500baseT_Full))
return PHY_INTERFACE_MODE_2500BASEX;
if (phylink_test(link_modes, 1000baseT_Half) ||