public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: sfp: add quirk for Finisar FTLF8536P4BCL
@ 2021-10-13 10:45 Paul Menzel
  2021-10-14 16:49 ` Russell King (Oracle)
  2021-10-18 14:47 ` Russell King (Oracle)
  0 siblings, 2 replies; 4+ messages in thread
From: Paul Menzel @ 2021-10-13 10:45 UTC (permalink / raw)
  To: Russell King, Andrew Lunn, Heiner Kallweit, David S. Miller,
	Jakub Kicinski
  Cc: Taras Chornyi, Vadym Kochan, Paul Menzel, netdev, linux-kernel

From: Taras Chornyi <taras.chornyi@plvision.eu>

Finisar FTLF8536P4BCL can operate at 1000base-X and 10000base-SR, but
reports 25G & 100GBd SR in it's EEPROM.

Signed-off-by: Vadym Kochan <vadym.kochan@plvision.eu>
Signed-off-by: Taras Chornyi <taras.chornyi@plvision.eu>

[Upstream from https://github.com/dentproject/dentOS/pull/133/commits/b87b10ef72ea4638e80588facf3c9c2c1be67b40]

Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
---
 drivers/net/phy/sfp-bus.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c
index 7362f8c3271c..162b4030a863 100644
--- a/drivers/net/phy/sfp-bus.c
+++ b/drivers/net/phy/sfp-bus.c
@@ -55,6 +55,13 @@ static void sfp_quirk_ubnt_uf_instant(const struct sfp_eeprom_id *id,
 	phylink_set(modes, 1000baseX_Full);
 }
 
+static void sfp_quirk_finisar_25g(const struct sfp_eeprom_id *id,
+				  unsigned long *modes)
+{
+	phylink_set(modes, 1000baseX_Full);
+	phylink_set(modes, 10000baseSR_Full);
+}
+
 static const struct sfp_quirk sfp_quirks[] = {
 	{
 		// Alcatel Lucent G-010S-P can operate at 2500base-X, but
@@ -78,7 +85,13 @@ static const struct sfp_quirk sfp_quirks[] = {
 		.vendor = "UBNT",
 		.part = "UF-INSTANT",
 		.modes = sfp_quirk_ubnt_uf_instant,
-	},
+	}, {
+		// Finisar FTLF8536P4BCL can operate at 1000base-X and 10000base-SR,
+		// but reports 25G & 100GBd SR in it's EEPROM
+		.vendor = "FINISAR CORP.",
+		.part = "FTLF8536P4BCL",
+		.modes = sfp_quirk_finisar_25g,
+	}
 };
 
 static size_t sfp_strlen(const char *str, size_t maxlen)
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-18 14:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-13 10:45 [PATCH] net: sfp: add quirk for Finisar FTLF8536P4BCL Paul Menzel
2021-10-14 16:49 ` Russell King (Oracle)
2021-10-18 11:05   ` Vadym Kochan
2021-10-18 14:47 ` Russell King (Oracle)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox