Message ID | 20210611125453.313308-4-steen.hegelund@microchip.com |
---|---|
State | New |
Headers | show |
Series | [net-next,1/4] dt-bindings: net: Add 25G BASE-R phy interface | expand |
On Fri, Jun 11, 2021 at 02:54:52PM +0200, Steen Hegelund wrote: > Add support for 25gbase-r modules. This is needed for the Sparx5 switch. > > Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> > Signed-off-by: Bjarni Jonasson <bjarni.jonasson@microchip.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Andrew
On Fri, Jun 11, 2021 at 02:54:52PM +0200, Steen Hegelund wrote: > Add support for 25gbase-r modules. This is needed for the Sparx5 switch. > > Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> > Signed-off-by: Bjarni Jonasson <bjarni.jonasson@microchip.com> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c index e61de66e973b..1db9cea13690 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) ||