From: Steen Hegelund Date: Fri, 11 Jun 2021 12:54:52 +0000 (+0200) Subject: net: sfp: add support for 25G BASE-R SFPs X-Git-Tag: v5.14-rc1~119^2~195^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=452d2c6fbae2c11e3b0c17a3afe7b145db2196e7;p=thirdparty%2Fkernel%2Flinux.git net: sfp: add support for 25G BASE-R SFPs Add support for 25gbase-r modules. This is needed for the Sparx5 switch. Signed-off-by: Steen Hegelund Signed-off-by: Bjarni Jonasson Reviewed-by: Andrew Lunn Reviewed-by: Russell King (Oracle) Signed-off-by: David S. Miller --- diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c index e61de66e973b3..1db9cea136906 100644 --- a/drivers/net/phy/sfp-bus.c +++ b/drivers/net/phy/sfp-bus.c @@ -392,6 +392,11 @@ EXPORT_SYMBOL_GPL(sfp_parse_support); phy_interface_t sfp_select_interface(struct sfp_bus *bus, unsigned long *link_modes) { + if (phylink_test(link_modes, 25000baseCR_Full) || + phylink_test(link_modes, 25000baseKR_Full) || + phylink_test(link_modes, 25000baseSR_Full)) + return PHY_INTERFACE_MODE_25GBASER; + if (phylink_test(link_modes, 10000baseCR_Full) || phylink_test(link_modes, 10000baseSR_Full) || phylink_test(link_modes, 10000baseLR_Full) ||