linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: sfp: add 2500base-X quirk for Lantech SFP module
@ 2022-03-12 20:50 Michael Walle
  2022-03-15  5:07 ` Jakub Kicinski
  2022-03-15 11:00 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Michael Walle @ 2022-03-12 20:50 UTC (permalink / raw)
  To: Russell King
  Cc: netdev, linux-kernel, Andrew Lunn, Heiner Kallweit,
	David S . Miller, Jakub Kicinski, Michael Walle

The Lantech 8330-262D-E module is 2500base-X capable, but it reports the
nominal bitrate as 2500MBd instead of 3125MBd. Add a quirk for the
module.

The following in an EEPROM dump of such a SFP with the serial number
redacted:

00: 03 04 07 00 00 00 01 20 40 0c 05 01 19 00 00 00    ???...? @????...
10: 1e 0f 00 00 4c 61 6e 74 65 63 68 20 20 20 20 20    ??..Lantech
20: 20 20 20 20 00 00 00 00 38 33 33 30 2d 32 36 32        ....8330-262
30: 44 2d 45 20 20 20 20 20 56 31 2e 30 03 52 00 cb    D-E     V1.0?R.?
40: 00 1a 00 00 46 43 XX XX XX XX XX XX XX XX XX XX    .?..FCXXXXXXXXXX
50: 20 20 20 20 32 32 30 32 31 34 20 20 68 b0 01 98        220214  h???
60: 45 58 54 52 45 4d 45 4c 59 20 43 4f 4d 50 41 54    EXTREMELY COMPAT
70: 49 42 4c 45 20 20 20 20 20 20 20 20 20 20 20 20    IBLE

Signed-off-by: Michael Walle <michael@walle.cc>
---
 drivers/net/phy/sfp-bus.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c
index c1512c9925a6..15aa5ac1ff49 100644
--- a/drivers/net/phy/sfp-bus.c
+++ b/drivers/net/phy/sfp-bus.c
@@ -74,6 +74,12 @@ static const struct sfp_quirk sfp_quirks[] = {
 		.vendor = "HUAWEI",
 		.part = "MA5671A",
 		.modes = sfp_quirk_2500basex,
+	}, {
+		// Lantech 8330-262D-E can operate at 2500base-X, but
+		// incorrectly report 2500MBd NRZ in their EEPROM
+		.vendor = "Lantech",
+		.part = "8330-262D-E",
+		.modes = sfp_quirk_2500basex,
 	}, {
 		.vendor = "UBNT",
 		.part = "UF-INSTANT",
-- 
2.30.2


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

* Re: [PATCH net-next] net: sfp: add 2500base-X quirk for Lantech SFP module
  2022-03-12 20:50 [PATCH net-next] net: sfp: add 2500base-X quirk for Lantech SFP module Michael Walle
@ 2022-03-15  5:07 ` Jakub Kicinski
  2022-03-15  8:30   ` Michael Walle
  2022-03-15 11:00 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2022-03-15  5:07 UTC (permalink / raw)
  To: Michael Walle
  Cc: Russell King, netdev, linux-kernel, Andrew Lunn, Heiner Kallweit,
	David S . Miller

On Sat, 12 Mar 2022 21:50:14 +0100 Michael Walle wrote:
> The Lantech 8330-262D-E module is 2500base-X capable, but it reports the
> nominal bitrate as 2500MBd instead of 3125MBd. Add a quirk for the
> module.
> 
> The following in an EEPROM dump of such a SFP with the serial number
> redacted:
> 
> 00: 03 04 07 00 00 00 01 20 40 0c 05 01 19 00 00 00    ???...? @????...
> 10: 1e 0f 00 00 4c 61 6e 74 65 63 68 20 20 20 20 20    ??..Lantech
> 20: 20 20 20 20 00 00 00 00 38 33 33 30 2d 32 36 32        ....8330-262
> 30: 44 2d 45 20 20 20 20 20 56 31 2e 30 03 52 00 cb    D-E     V1.0?R.?
> 40: 00 1a 00 00 46 43 XX XX XX XX XX XX XX XX XX XX    .?..FCXXXXXXXXXX
> 50: 20 20 20 20 32 32 30 32 31 34 20 20 68 b0 01 98        220214  h???
> 60: 45 58 54 52 45 4d 45 4c 59 20 43 4f 4d 50 41 54    EXTREMELY COMPAT
> 70: 49 42 4c 45 20 20 20 20 20 20 20 20 20 20 20 20    IBLE

Any idea what the "Extremely Compatible" is referring to? :-D

> Signed-off-by: Michael Walle <michael@walle.cc>

A quirk like this seems safe to apply to net and 5.17, still.
Would you prefer that or net-next as marked?

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

* Re: [PATCH net-next] net: sfp: add 2500base-X quirk for Lantech SFP module
  2022-03-15  5:07 ` Jakub Kicinski
@ 2022-03-15  8:30   ` Michael Walle
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Walle @ 2022-03-15  8:30 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Russell King, netdev, linux-kernel, Andrew Lunn, Heiner Kallweit,
	David S . Miller

Am 2022-03-15 06:07, schrieb Jakub Kicinski:
> On Sat, 12 Mar 2022 21:50:14 +0100 Michael Walle wrote:
>> The Lantech 8330-262D-E module is 2500base-X capable, but it reports 
>> the
>> nominal bitrate as 2500MBd instead of 3125MBd. Add a quirk for the
>> module.
>> 
>> The following in an EEPROM dump of such a SFP with the serial number
>> redacted:
>> 
>> 00: 03 04 07 00 00 00 01 20 40 0c 05 01 19 00 00 00    ???...? 
>> @????...
>> 10: 1e 0f 00 00 4c 61 6e 74 65 63 68 20 20 20 20 20    ??..Lantech
>> 20: 20 20 20 20 00 00 00 00 38 33 33 30 2d 32 36 32        
>> ....8330-262
>> 30: 44 2d 45 20 20 20 20 20 56 31 2e 30 03 52 00 cb    D-E     
>> V1.0?R.?
>> 40: 00 1a 00 00 46 43 XX XX XX XX XX XX XX XX XX XX    
>> .?..FCXXXXXXXXXX
>> 50: 20 20 20 20 32 32 30 32 31 34 20 20 68 b0 01 98        220214  
>> h???
>> 60: 45 58 54 52 45 4d 45 4c 59 20 43 4f 4d 50 41 54    EXTREMELY 
>> COMPAT
>> 70: 49 42 4c 45 20 20 20 20 20 20 20 20 20 20 20 20    IBLE
> 
> Any idea what the "Extremely Compatible" is referring to? :-D

Haha, I smirked on that, too. Anything between 60 and 7f
is vendor specific. So.. good for a laugh?

>> Signed-off-by: Michael Walle <michael@walle.cc>
> 
> A quirk like this seems safe to apply to net and 5.17, still.
> Would you prefer that or net-next as marked?

Personally, I don't have any preference because the board
is just in the process of being upstreamed. Just pick one ;)
I'd say net-next because 5.17 development is almost at the
end.

-michael

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

* Re: [PATCH net-next] net: sfp: add 2500base-X quirk for Lantech SFP module
  2022-03-12 20:50 [PATCH net-next] net: sfp: add 2500base-X quirk for Lantech SFP module Michael Walle
  2022-03-15  5:07 ` Jakub Kicinski
@ 2022-03-15 11:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-03-15 11:00 UTC (permalink / raw)
  To: Michael Walle
  Cc: linux, netdev, linux-kernel, andrew, hkallweit1, davem, kuba

Hello:

This patch was applied to netdev/net-next.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Sat, 12 Mar 2022 21:50:14 +0100 you wrote:
> The Lantech 8330-262D-E module is 2500base-X capable, but it reports the
> nominal bitrate as 2500MBd instead of 3125MBd. Add a quirk for the
> module.
> 
> The following in an EEPROM dump of such a SFP with the serial number
> redacted:
> 
> [...]

Here is the summary with links:
  - [net-next] net: sfp: add 2500base-X quirk for Lantech SFP module
    https://git.kernel.org/netdev/net-next/c/00eec9fe4f3b

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2022-03-15 11:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-12 20:50 [PATCH net-next] net: sfp: add 2500base-X quirk for Lantech SFP module Michael Walle
2022-03-15  5:07 ` Jakub Kicinski
2022-03-15  8:30   ` Michael Walle
2022-03-15 11:00 ` patchwork-bot+netdevbpf

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).