Skip to contentSkip to conversation

net: sfp: add quirk for FS SFP-10GM-T copper SFP+ module

PATCH Superseded Martin Schiller 4 participants 9 messages Feb 26, 2025

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: sfp: add quirk for FS SFP-10GM-T copper SFP+ module

Add quirk for a copper SFP that identifies itself as "FS" "SFP-10GM-T". It uses RollBall protocol to talk to the PHY and needs 4 sec wait before probing the PHY.

---
 drivers/net/phy/sfp.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/phy/sfp.c +3 -2
index 9369f5297769..15284be4c38c 100644
@@ -479,9 +479,10 @@ static const struct sfp_quirk sfp_quirks[] = {
 	// PHY.
 	SFP_QUIRK_F("FS", "SFP-10G-T", sfp_fixup_fs_10gt),
 
-	// Fiberstore SFP-2.5G-T uses Rollball protocol to talk to the PHY and
-	// needs 4 sec wait before probing the PHY.
+	// Fiberstore SFP-2.5G-T and SFP-10GM-T uses Rollball protocol to talk
+	// to the PHY and needs 4 sec wait before probing the PHY.
 	SFP_QUIRK_F("FS", "SFP-2.5G-T", sfp_fixup_fs_2_5gt),
+	SFP_QUIRK_F("FS", "SFP-10GM-T", sfp_fixup_fs_2_5gt),
 
 	// Fiberstore GPON-ONU-34-20BI can operate at 2500base-X, but report 1.2GBd
 	// NRZ in their EEPROM
Signature · 1 line
2.39.5
#1 lore raw
Quoted 14 lines · Martin Schiller

Add quirk for a copper SFP that identifies itself as "FS" "SFP-10GM-T". It uses RollBall protocol to talk to the PHY and needs 4 sec wait before probing the PHY.

---
 drivers/net/phy/sfp.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/phy/sfp.c +0 -0
index 9369f5297769..15284be4c38c 100644

drivers/net/phy/sfp.c static const struct sfp_quirk sfp_quirks[] = { · line 485

Quoted 9 lines
drivers/net/phy/sfp.c +3 -2
@@ -479,9 +479,10 @@ static const struct sfp_quirk sfp_quirks[] = {
 	// PHY.
 	SFP_QUIRK_F("FS", "SFP-10G-T", sfp_fixup_fs_10gt),
 
-	// Fiberstore SFP-2.5G-T uses Rollball protocol to talk to the PHY and
-	// needs 4 sec wait before probing the PHY.
+	// Fiberstore SFP-2.5G-T and SFP-10GM-T uses Rollball protocol to talk
+	// to the PHY and needs 4 sec wait before probing the PHY.
 	SFP_QUIRK_F("FS", "SFP-2.5G-T", sfp_fixup_fs_2_5gt),
+	SFP_QUIRK_F("FS", "SFP-10GM-T", sfp_fixup_fs_2_5gt),

Which makes sfp_fixup_fs_2_5gt mis-named. Please rename.

Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
#2 lore raw
Quoted 18 lines · Russell King (Oracle)
Quoted 17 lines · Martin Schiller

Add quirk for a copper SFP that identifies itself as "FS" "SFP-10GM-T". It uses RollBall protocol to talk to the PHY and needs 4 sec wait before probing the PHY.

---
 drivers/net/phy/sfp.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/phy/sfp.c +0 -0
index 9369f5297769..15284be4c38c 100644
@@ -479,9 +479,10 @@ static const struct sfp_quirk sfp_quirks[] = {
 	// PHY.
 	SFP_QUIRK_F("FS", "SFP-10G-T", sfp_fixup_fs_10gt),
 
Quoted 10 lines

drivers/net/phy/sfp.c static const struct sfp_quirk sfp_quirks[] = { · line 485

Quoted 8 lines
drivers/net/phy/sfp.c +0 -1
-	// Fiberstore SFP-2.5G-T uses Rollball protocol to talk to the PHY 

and

drivers/net/phy/sfp.c +1 -1
-	// needs 4 sec wait before probing the PHY.
+	// Fiberstore SFP-2.5G-T and SFP-10GM-T uses Rollball protocol to 

talk

drivers/net/phy/sfp.c +2 -0
+	// to the PHY and needs 4 sec wait before probing the PHY.
 	SFP_QUIRK_F("FS", "SFP-2.5G-T", sfp_fixup_fs_2_5gt),
+	SFP_QUIRK_F("FS", "SFP-10GM-T", sfp_fixup_fs_2_5gt),

Which makes sfp_fixup_fs_2_5gt mis-named. Please rename.

OK, I'll rename it to sfp_fixup_rollball_wait.

#3 lore raw
Quoted 32 lines · On Wed, 26 Feb 2025 15:50:46 +0100 Martin Schiller <[email protected]> wrote:
Quoted 20 lines · Russell King (Oracle)
Quoted 19 lines · Martin Schiller

Add quirk for a copper SFP that identifies itself as "FS" "SFP-10GM-T".
It uses RollBall protocol to talk to the PHY and needs 4 sec wait before
probing the PHY.

---
 drivers/net/phy/sfp.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/phy/sfp.c +0 -0
index 9369f5297769..15284be4c38c 100644
@@ -479,9 +479,10 @@ static const struct sfp_quirk sfp_quirks[] = {
 	// PHY.
 	SFP_QUIRK_F("FS", "SFP-10G-T", sfp_fixup_fs_10gt),
 
Quoted 10 lines

drivers/net/phy/sfp.c static const struct sfp_quirk sfp_quirks[] = { · line 485

Quoted 8 lines
drivers/net/phy/sfp.c +0 -1
-	// Fiberstore SFP-2.5G-T uses Rollball protocol to talk to the

PHY and

drivers/net/phy/sfp.c +1 -1
-	// needs 4 sec wait before probing the PHY.
+	// Fiberstore SFP-2.5G-T and SFP-10GM-T uses Rollball protocol to 

talk

drivers/net/phy/sfp.c +2 -0
+	// to the PHY and needs 4 sec wait before probing the PHY.
 	SFP_QUIRK_F("FS", "SFP-2.5G-T", sfp_fixup_fs_2_5gt),
+	SFP_QUIRK_F("FS", "SFP-10GM-T", sfp_fixup_fs_2_5gt),  

Which makes sfp_fixup_fs_2_5gt mis-named. Please rename.

Quoted 1 line

OK, I'll rename it to sfp_fixup_rollball_wait.

I would prefer sfp_fixup_fs_rollball_wait to keep the name of the manufacturer. It can't be a generic fixup as other FSP could have other waiting time values like the Turris RTSFP-10G which needs 25s.

Signature · 3 lines
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
#4 lore raw
Quoted 35 lines · Kory Maincent
Quoted 32 lines · On Wed, 26 Feb 2025 15:50:46 +0100 Martin Schiller <[email protected]> wrote:
Quoted 30 lines · Russell King (Oracle)
Quoted 24 lines · Martin Schiller

Add quirk for a copper SFP that identifies itself as "FS" "SFP-10GM-T".
It uses RollBall protocol to talk to the PHY and needs 4 sec wait before
probing the PHY.

---
 drivers/net/phy/sfp.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/phy/sfp.c +0 -1
index 9369f5297769..15284be4c38c 100644
@@ -479,9 +479,10 @@ static const struct sfp_quirk sfp_quirks[] = {
 	// PHY.
 	SFP_QUIRK_F("FS", "SFP-10G-T", sfp_fixup_fs_10gt),
 
-	// Fiberstore SFP-2.5G-T uses Rollball protocol to talk to the

PHY and

drivers/net/phy/sfp.c +1 -1
-	// needs 4 sec wait before probing the PHY.
+	// Fiberstore SFP-2.5G-T and SFP-10GM-T uses Rollball protocol to

talk

drivers/net/phy/sfp.c static const struct sfp_quirk sfp_quirks[] = { · line 485

Quoted 3 lines
drivers/net/phy/sfp.c +2 -0
+	// to the PHY and needs 4 sec wait before probing the PHY.
 	SFP_QUIRK_F("FS", "SFP-2.5G-T", sfp_fixup_fs_2_5gt),
+	SFP_QUIRK_F("FS", "SFP-10GM-T", sfp_fixup_fs_2_5gt),

Which makes sfp_fixup_fs_2_5gt mis-named. Please rename.

Quoted 5 lines
Quoted 1 line

OK, I'll rename it to sfp_fixup_rollball_wait.

I would prefer sfp_fixup_fs_rollball_wait to keep the name of the manufacturer. It can't be a generic fixup as other FSP could have other waiting time values like the Turris RTSFP-10G which needs 25s.

I think you're getting two things mixed up.
The phy still has 25 seconds to wake up. With sfp_fixup_rollball_wait there simply is an additional 4s wait at the beginning before we start searching for a phy.

#5 lore raw
Quoted 17 lines · On Wed, 26 Feb 2025 16:55:38 +0100 Martin Schiller <[email protected]> wrote:
Quoted 4 lines · Kory Maincent
Quoted 1 line · On Wed, 26 Feb 2025 15:50:46 +0100 Martin Schiller <[email protected]> wrote:

On 2025-02-26 15:38, Russell King (Oracle) wrote:

[...]
[...]
[...]

Quoted 8 lines
Quoted 2 lines

OK, I'll rename it to sfp_fixup_rollball_wait.

I would prefer sfp_fixup_fs_rollball_wait to keep the name of the manufacturer.
It can't be a generic fixup as other FSP could have other waiting time values
like the Turris RTSFP-10G which needs 25s.

Quoted 4 lines

I think you're getting two things mixed up.
The phy still has 25 seconds to wake up. With sfp_fixup_rollball_wait there simply is an additional 4s wait at the beginning before we start searching for a phy.

Indeed you are right, I was looking in older Linux sources, sorry. Still, the additional 4s wait seems relevant only for FS SFP, so it should be included in the function naming to avoid confusion.

Regards,

Signature · 3 lines
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
#6 lore raw
Quoted 20 lines · Kory Maincent
Quoted 17 lines · On Wed, 26 Feb 2025 16:55:38 +0100 Martin Schiller <[email protected]> wrote:
Quoted 4 lines · Kory Maincent
Quoted 1 line · On Wed, 26 Feb 2025 15:50:46 +0100 Martin Schiller <[email protected]> wrote:

On 2025-02-26 15:38, Russell King (Oracle) wrote:

[...]
[...]
[...]

Quoted 8 lines
Quoted 2 lines

OK, I'll rename it to sfp_fixup_rollball_wait.

I would prefer sfp_fixup_fs_rollball_wait to keep the name of the manufacturer.
It can't be a generic fixup as other FSP could have other waiting time values
like the Turris RTSFP-10G which needs 25s.

Quoted 9 lines
Quoted 4 lines

I think you're getting two things mixed up.
The phy still has 25 seconds to wake up. With sfp_fixup_rollball_wait there simply is an additional 4s wait at the beginning before we start searching for a phy.

Indeed you are right, I was looking in older Linux sources, sorry. Still, the additional 4s wait seems relevant only for FS SFP, so it should be included in the function naming to avoid confusion.

You may be right for the moment. But perhaps there will soon be SFP modules from other manufacturers that also need this quirk.

There is also the function sfp_fixup_rollball_cc, which is currently only used for modules with vendor string “OEM”. However, the function is not called sfp_fixup_oem_rollball_cc.

Regards,
Martin

maintainer
#7 lore raw
Quoted 26 lines · Martin Schiller
Quoted 25 lines · Kory Maincent
Quoted 21 lines · On Wed, 26 Feb 2025 16:55:38 +0100 Martin Schiller <[email protected]> wrote:
Quoted 4 lines · Kory Maincent
Quoted 1 line · On Wed, 26 Feb 2025 15:50:46 +0100 Martin Schiller <[email protected]> wrote:

On 2025-02-26 15:38, Russell King (Oracle) wrote:

[...]
[...]
[...]

Quoted 8 lines
Quoted 2 lines

OK, I'll rename it to sfp_fixup_rollball_wait.

I would prefer sfp_fixup_fs_rollball_wait to keep the name of the manufacturer.
It can't be a generic fixup as other FSP could have other waiting time values
like the Turris RTSFP-10G which needs 25s.

I think you're getting two things mixed up.
The phy still has 25 seconds to wake up. With sfp_fixup_rollball_wait there simply is an additional 4s wait at the beginning before we start searching for a phy.

Quoted 8 lines
Quoted 5 lines

Indeed you are right, I was looking in older Linux sources, sorry. Still, the additional 4s wait seems relevant only for FS SFP, so it should
be included in the function naming to avoid confusion.

You may be right for the moment. But perhaps there will soon be SFP modules from other manufacturers that also need this quirk.

Since these are all kernel internal implementation details, we can rename them any time we want. There is no kernel ABI involved. So please use a name based on what we know now. If such a module does appear sometime in the future, we can change the name at that point.

Andrew

#8 lore raw
In reply to Martin Schiller
Quoted 24 lines · On Wed, 26 Feb 2025 17:51:42 +0100 Martin Schiller <[email protected]> wrote:
Quoted 4 lines · Kory Maincent
Quoted 1 line · On Wed, 26 Feb 2025 16:55:38 +0100 Martin Schiller <[email protected]> wrote:

On 2025-02-26 16:26, Kory Maincent wrote:

[...]
[...]

Quoted 3 lines
Quoted 3 lines

[...]
[...]
[...]

[...]
[...]

Quoted 11 lines
Quoted 5 lines

I think you're getting two things mixed up.
The phy still has 25 seconds to wake up. With sfp_fixup_rollball_wait there simply is an additional 4s wait at the beginning before we start searching for a phy.

Indeed you are right, I was looking in older Linux sources, sorry. Still, the additional 4s wait seems relevant only for FS SFP, so it should
be included in the function naming to avoid confusion.

Quoted 6 lines

You may be right for the moment. But perhaps there will soon be SFP modules from other manufacturers that also need this quirk.

There is also the function sfp_fixup_rollball_cc, which is currently only used for modules with vendor string “OEM”. However, the function is not called sfp_fixup_oem_rollball_cc.

Indeed. As you prefer then.

Regards,

Signature · 3 lines
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com