[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210216192055.7078-5-kabel@kernel.org>
Date: Tue, 16 Feb 2021 20:20:55 +0100
From: Marek Behún <kabel@...nel.org>
To: netdev@...r.kernel.org,
Russell King - ARM Linux admin <linux@...linux.org.uk>,
davem@...emloft.net, kuba@...nel.org
Cc: pavana.sharma@...i.com, vivien.didelot@...il.com,
f.fainelli@...il.com, lkp@...el.com, ashkan.boldaji@...i.com,
andrew@...n.ch, Chris Packham <chris.packham@...iedtelesis.co.nz>,
olteanv@...il.com,
Marek Behún <kabel@...nel.org>
Subject: [PATCH net-next 4/4] 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@...nel.org>
---
drivers/net/phy/sfp-bus.c | 3 +++
1 file changed, 3 insertions(+)
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;
--
2.26.2
Powered by blists - more mailing lists