diff options
author | Marek BehĂșn <kabel@kernel.org> | 2021-02-16 20:20:55 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-02-16 14:15:12 -0800 |
commit | cfb971dec56b0ea1afe34b67d9481a9d29e65a58 (patch) | |
tree | 57ac7bdb0f003d8422b1a0782cba958ca7186b53 /drivers/net/phy/sfp-bus.c | |
parent | f6813bdafdb370d4fb371922d86ff85b681a736b (diff) |
sfp: add support for 5gbase-t SFPs
The sfp_parse_support() function is setting 5000baseT_Full in some cases.
Now that we have PHY_INTERFACE_MODE_5GBASER interface mode available,
change sfp_select_interface() to return PHY_INTERFACE_MODE_5GBASER if
5000baseT_Full is set in the link mode mask.
Signed-off-by: Marek BehĂșn <kabel@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/sfp-bus.c')
-rw-r--r-- | drivers/net/phy/sfp-bus.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c index 3cfd773ae5f4..2e11176c6b94 100644 --- a/drivers/net/phy/sfp-bus.c +++ b/drivers/net/phy/sfp-bus.c @@ -400,6 +400,9 @@ phy_interface_t sfp_select_interface(struct sfp_bus *bus, phylink_test(link_modes, 10000baseT_Full)) return PHY_INTERFACE_MODE_10GBASER; + if (phylink_test(link_modes, 5000baseT_Full)) + return PHY_INTERFACE_MODE_5GBASER; + if (phylink_test(link_modes, 2500baseX_Full)) return PHY_INTERFACE_MODE_2500BASEX; |