* [PATCH 0/2] net: sfp: add quirks for FINISTAR FTL* modules
@ 2022-09-13 18:10 Oleksandr Mazur
2022-09-13 18:10 ` [PATCH 1/2] net: sfp: add quirk for FINISAR FTLX8574D3BCL and FTLX1471D3BCL SFP modules Oleksandr Mazur
2022-09-13 18:10 ` [PATCH 2/2] net: sfp: add quirk for FINISAR FTLF8536P4BCL SFP module Oleksandr Mazur
0 siblings, 2 replies; 5+ messages in thread
From: Oleksandr Mazur @ 2022-09-13 18:10 UTC (permalink / raw)
To: netdev, linux-kernel
Cc: pabeni, kuba, edumazet, davem, hkallweit1, andrew, linux,
Oleksandr Mazur
This patch series adds quirks for three FINISTAR sfp modules, which
report not all supported modes and thus must have some software fixups
to overcome the invalid EEPROM data.
FTLX8574D3BCL and FTLX1471D3BCL EEPROMs are missing supported
1000baseX_Full mode, while FTLF8536P4BCL's EEPROM doesn't
report both 1000baseX_Full and 10000baseSR_Full which it (module)
supports.
The patches are combined into a series to ease-out applying
(one of the commits is based on another one, to overcome the
merge conflicts in case if one of them gets applied, if sent
in separate).
Oleksandr Mazur (2):
net: sfp: add quirk for FINISAR FTLX8574D3BCL and FTLX1471D3BCL SFP
modules
net: sfp: add quirk for FINISAR FTLF8536P4BCL SFP module
drivers/net/phy/sfp-bus.c | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] net: sfp: add quirk for FINISAR FTLX8574D3BCL and FTLX1471D3BCL SFP modules
2022-09-13 18:10 [PATCH 0/2] net: sfp: add quirks for FINISTAR FTL* modules Oleksandr Mazur
@ 2022-09-13 18:10 ` Oleksandr Mazur
2022-09-13 19:00 ` Russell King (Oracle)
2022-09-13 18:10 ` [PATCH 2/2] net: sfp: add quirk for FINISAR FTLF8536P4BCL SFP module Oleksandr Mazur
1 sibling, 1 reply; 5+ messages in thread
From: Oleksandr Mazur @ 2022-09-13 18:10 UTC (permalink / raw)
To: netdev, linux-kernel
Cc: pabeni, kuba, edumazet, davem, hkallweit1, andrew, linux,
Oleksandr Mazur
FINISAR FTLX8574D3BCL and FTLX1471D3BCL modules report 10Gbase-SR mode
support, but can also operate at 1000base-X.
Add quirk to also support 1000base-X.
EEPROM content of FTLX8574D3BCL SFP module is (where XX is serial number):
00: 03 04 07 10 00 00 00 00 00 00 00 06 67 00 00 00 |............g...|
10: 08 03 00 1e 46 49 4e 49 53 41 52 20 43 4f 52 50 |....FINISAR CORP|
20: 2e 20 20 20 00 00 90 65 46 54 4c 58 38 35 37 34 |. ...eFTLX8574|
30: 44 33 42 43 4c 20 20 20 41 20 20 20 03 52 00 4b |D3BCL A .R.K|
40: 00 1a 00 00 41 30 XX XX XX XX XX XX XX XX XX XX |....A0XXXXXXXXXX|
50: 20 20 20 20 31 38 30 38 31 32 20 20 68 f0 05 e7 | 180812 h...|
EEPROM content of FTLX1471D3BCL SFP module is (where XX is serial number):
00: 03 04 07 20 00 00 00 00 00 00 00 06 67 00 0a 64 |... ........g..d|
10: 00 00 00 00 46 49 4e 49 53 41 52 20 43 4f 52 50 |....FINISAR CORP|
20: 2e 20 20 20 00 00 90 65 46 54 4c 58 31 34 37 31 |. ...eFTLX1471|
30: 44 33 42 43 4c 20 20 20 41 20 20 20 05 1e 00 63 |D3BCL A ...c|
40: 00 1a 00 00 55 4b XX XX XX XX XX XX XX XX XX XX |....UKXXXXXXXXXX|
50: 20 20 20 20 31 31 30 34 30 32 20 20 68 f0 03 bb | 110402 h...|
Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
---
drivers/net/phy/sfp-bus.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c
index 15aa5ac1ff49..c3df85501836 100644
--- a/drivers/net/phy/sfp-bus.c
+++ b/drivers/net/phy/sfp-bus.c
@@ -38,6 +38,12 @@ struct sfp_bus {
bool started;
};
+static void sfp_quirk_1000basex(const struct sfp_eeprom_id *id,
+ unsigned long *modes)
+{
+ phylink_set(modes, 1000baseX_Full);
+}
+
static void sfp_quirk_2500basex(const struct sfp_eeprom_id *id,
unsigned long *modes)
{
@@ -84,6 +90,16 @@ static const struct sfp_quirk sfp_quirks[] = {
.vendor = "UBNT",
.part = "UF-INSTANT",
.modes = sfp_quirk_ubnt_uf_instant,
+ }, {
+ // Finisar FTLX1471D3BCL can operate at 1000base-X and 10000base-SR,
+ .vendor = "FINISAR CORP.",
+ .part = "FTLX1471D3BCL",
+ .modes = sfp_quirk_1000basex,
+ }, {
+ // Finisar FTLX8574D3BCL can operate at 1000base-X and 10000base-SR,
+ .vendor = "FINISAR CORP.",
+ .part = "FTLX8574D3BCL",
+ .modes = sfp_quirk_1000basex,
},
};
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] net: sfp: add quirk for FINISAR FTLF8536P4BCL SFP module
2022-09-13 18:10 [PATCH 0/2] net: sfp: add quirks for FINISTAR FTL* modules Oleksandr Mazur
2022-09-13 18:10 ` [PATCH 1/2] net: sfp: add quirk for FINISAR FTLX8574D3BCL and FTLX1471D3BCL SFP modules Oleksandr Mazur
@ 2022-09-13 18:10 ` Oleksandr Mazur
2022-09-13 19:01 ` Russell King (Oracle)
1 sibling, 1 reply; 5+ messages in thread
From: Oleksandr Mazur @ 2022-09-13 18:10 UTC (permalink / raw)
To: netdev, linux-kernel
Cc: pabeni, kuba, edumazet, davem, hkallweit1, andrew, linux,
Oleksandr Mazur
The FINISAR FTLF8536P4BCL reports 25G & 100GBd SR in it's EEPROM,
but supports only 1000base-X and 10000base-SR modes.
Add quirk to clear unsupported modes, and set only the ones that
module actually supports: 1000base-X and 10000base-SR.
EEPROM content of this SFP module is (where XX is serial number):
00: 03 04 07 00 00 00 00 00 00 00 00 06 ff 00 00 00 |................|
10: 02 00 0a 07 46 49 4e 49 53 41 52 20 43 4f 52 50 |....FINISAR CORP|
20: 2e 20 20 20 02 00 90 65 46 54 4c 46 38 35 33 36 |. ...eFTLF8536|
30: 50 34 42 43 4c 20 20 20 41 20 20 20 03 52 00 b8 |P4BCL A .R..|
40: 08 1a 70 00 55 55 XX XX XX XX XX XX XX XX XX XX |..p.UUXXXXXXXXXX|
50: 20 20 20 20 31 36 30 32 31 30 20 20 68 f0 08 62 | 160210 h..b|
Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
Change-Id: I320058dee38724d3564fc2500ae2e3abfe3d47bb
---
drivers/net/phy/sfp-bus.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c
index c3df85501836..a7799162e3a7 100644
--- a/drivers/net/phy/sfp-bus.c
+++ b/drivers/net/phy/sfp-bus.c
@@ -61,6 +61,17 @@ static void sfp_quirk_ubnt_uf_instant(const struct sfp_eeprom_id *id,
phylink_set(modes, 1000baseX_Full);
}
+static void sfp_quirk_finisar_ftlf8536p4bcl(const struct sfp_eeprom_id *id,
+ unsigned long *modes)
+{
+ /* Finisar FTLF8536P4BCL module claims 25G & 100GBd SR support in it's
+ * EEPROM, but can also support both 1000BaseX and 10000Base-SR modes.
+ * Set additionally supported modes: 1000baseX_Full and 10000baseSR_Full.
+ */
+ 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
@@ -100,6 +111,12 @@ static const struct sfp_quirk sfp_quirks[] = {
.vendor = "FINISAR CORP.",
.part = "FTLX8574D3BCL",
.modes = sfp_quirk_1000basex,
+ }, {
+ // 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_ftlf8536p4bcl,
},
};
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] net: sfp: add quirk for FINISAR FTLX8574D3BCL and FTLX1471D3BCL SFP modules
2022-09-13 18:10 ` [PATCH 1/2] net: sfp: add quirk for FINISAR FTLX8574D3BCL and FTLX1471D3BCL SFP modules Oleksandr Mazur
@ 2022-09-13 19:00 ` Russell King (Oracle)
0 siblings, 0 replies; 5+ messages in thread
From: Russell King (Oracle) @ 2022-09-13 19:00 UTC (permalink / raw)
To: Oleksandr Mazur
Cc: netdev, linux-kernel, pabeni, kuba, edumazet, davem, hkallweit1,
andrew
On Tue, Sep 13, 2022 at 09:10:08PM +0300, Oleksandr Mazur wrote:
> FINISAR FTLX8574D3BCL and FTLX1471D3BCL modules report 10Gbase-SR mode
> support, but can also operate at 1000base-X.
>
> Add quirk to also support 1000base-X.
>
> EEPROM content of FTLX8574D3BCL SFP module is (where XX is serial number):
>
> 00: 03 04 07 10 00 00 00 00 00 00 00 06 67 00 00 00 |............g...|
> 10: 08 03 00 1e 46 49 4e 49 53 41 52 20 43 4f 52 50 |....FINISAR CORP|
> 20: 2e 20 20 20 00 00 90 65 46 54 4c 58 38 35 37 34 |. ...eFTLX8574|
> 30: 44 33 42 43 4c 20 20 20 41 20 20 20 03 52 00 4b |D3BCL A .R.K|
> 40: 00 1a 00 00 41 30 XX XX XX XX XX XX XX XX XX XX |....A0XXXXXXXXXX|
> 50: 20 20 20 20 31 38 30 38 31 32 20 20 68 f0 05 e7 | 180812 h...|
>
> EEPROM content of FTLX1471D3BCL SFP module is (where XX is serial number):
>
> 00: 03 04 07 20 00 00 00 00 00 00 00 06 67 00 0a 64 |... ........g..d|
> 10: 00 00 00 00 46 49 4e 49 53 41 52 20 43 4f 52 50 |....FINISAR CORP|
> 20: 2e 20 20 20 00 00 90 65 46 54 4c 58 31 34 37 31 |. ...eFTLX1471|
> 30: 44 33 42 43 4c 20 20 20 41 20 20 20 05 1e 00 63 |D3BCL A ...c|
> 40: 00 1a 00 00 55 4b XX XX XX XX XX XX XX XX XX XX |....UKXXXXXXXXXX|
> 50: 20 20 20 20 31 31 30 34 30 32 20 20 68 f0 03 bb | 110402 h...|
Please include the ethtool -m output so we can see what this decodes
to. I'd rather not have to keep on writing tools to parse hexdumps
back to binary and then using a custom tool based on ethtool to get
that information.
However, having the binary dump from ethtool -m emailed to me so it
can be added to my database of EEPROM contents for future testing
would be useful.
Thanks.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] net: sfp: add quirk for FINISAR FTLF8536P4BCL SFP module
2022-09-13 18:10 ` [PATCH 2/2] net: sfp: add quirk for FINISAR FTLF8536P4BCL SFP module Oleksandr Mazur
@ 2022-09-13 19:01 ` Russell King (Oracle)
0 siblings, 0 replies; 5+ messages in thread
From: Russell King (Oracle) @ 2022-09-13 19:01 UTC (permalink / raw)
To: Oleksandr Mazur
Cc: netdev, linux-kernel, pabeni, kuba, edumazet, davem, hkallweit1,
andrew
On Tue, Sep 13, 2022 at 09:10:09PM +0300, Oleksandr Mazur wrote:
> The FINISAR FTLF8536P4BCL reports 25G & 100GBd SR in it's EEPROM,
> but supports only 1000base-X and 10000base-SR modes.
>
> Add quirk to clear unsupported modes, and set only the ones that
> module actually supports: 1000base-X and 10000base-SR.
This description does not match what the patch is doing. I see no
modes being cleared.
Thanks.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-09-13 19:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-13 18:10 [PATCH 0/2] net: sfp: add quirks for FINISTAR FTL* modules Oleksandr Mazur
2022-09-13 18:10 ` [PATCH 1/2] net: sfp: add quirk for FINISAR FTLX8574D3BCL and FTLX1471D3BCL SFP modules Oleksandr Mazur
2022-09-13 19:00 ` Russell King (Oracle)
2022-09-13 18:10 ` [PATCH 2/2] net: sfp: add quirk for FINISAR FTLF8536P4BCL SFP module Oleksandr Mazur
2022-09-13 19:01 ` 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;
as well as URLs for NNTP newsgroup(s).