* [PATCH net-next] net: sfp: add 2500base-X quirk for ODI DFP-34X-2C3
@ 2026-11-18 2:56 github
2026-11-18 3:28 ` Jakub Kicinski
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: github @ 2026-11-18 2:56 UTC (permalink / raw)
To: netdev
Cc: linux-kernel, linux, andrew, hkallweit1, davem, edumazet, kuba,
pabeni, Israel Cueto
From: Israel Cueto <github@bumblecito.com>
The ODI DFP-34X-2C3 XPON SFP module supports 2500Base-X.
Add a quirk to enable 2500Base-X support for this module.
Tested on a Horaco ZX-SWTGW2C8F switch with an ODI
DFP-34X-2C3 module. A 2500 Mb/s link was established
with speed and duplex forced and autonegotiation disabled.
Signed-off-by: Israel Cueto <github@bumblecito.com>
---
drivers/net/phy/sfp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c
index 915156743..666e515d2 100644
--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
@@ -606,6 +606,9 @@ static const struct sfp_quirk sfp_quirks[] = {
SFP_QUIRK("HSGQ", "HSGQ-XPON-Stick", sfp_quirk_2500basex,
sfp_fixup_ignore_tx_fault_and_los),
+ // ODI DFP-34X-2C3 XPON stick can operate at 2500base-X
+ SFP_QUIRK_S("ODI", "DFP-34X-2C3", sfp_quirk_2500basex),
+
// Lantech 8330-262D-E and 8330-265D can operate at 2500base-X, but
// incorrectly report 2500MBd NRZ in their EEPROM.
// Some 8330-265D modules have inverted LOS, while all of them report
--
2.34.1
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH net-next] net: sfp: add 2500base-X quirk for ODI DFP-34X-2C3 2026-11-18 2:56 [PATCH net-next] net: sfp: add 2500base-X quirk for ODI DFP-34X-2C3 github @ 2026-11-18 3:28 ` Jakub Kicinski 2026-11-18 3:45 ` [PATCH net-next v2] " github 2026-11-22 3:23 ` [PATCH net-next] " netdev-bot+sashiko 2 siblings, 0 replies; 6+ messages in thread From: Jakub Kicinski @ 2026-11-18 3:28 UTC (permalink / raw) To: github Cc: netdev, linux-kernel, linux, andrew, hkallweit1, davem, edumazet, pabeni On Wed, 18 Nov 2026 02:56:02 +0000 github@bumblecito.com wrote: > @@ -606,6 +606,9 @@ static const struct sfp_quirk sfp_quirks[] = { > SFP_QUIRK("HSGQ", "HSGQ-XPON-Stick", sfp_quirk_2500basex, > sfp_fixup_ignore_tx_fault_and_los), > > + // ODI DFP-34X-2C3 XPON stick can operate at 2500base-X > + SFP_QUIRK_S("ODI", "DFP-34X-2C3", sfp_quirk_2500basex), please try to keep this alphabetically sorted -- pw-bot: cr ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net-next v2] net: sfp: add 2500base-X quirk for ODI DFP-34X-2C3 2026-11-18 2:56 [PATCH net-next] net: sfp: add 2500base-X quirk for ODI DFP-34X-2C3 github 2026-11-18 3:28 ` Jakub Kicinski @ 2026-11-18 3:45 ` github 2026-11-18 13:35 ` Andrew Lunn 2026-11-22 3:54 ` netdev-bot+sashiko 2026-11-22 3:23 ` [PATCH net-next] " netdev-bot+sashiko 2 siblings, 2 replies; 6+ messages in thread From: github @ 2026-11-18 3:45 UTC (permalink / raw) To: netdev Cc: linux-kernel, linux, andrew, hkallweit1, davem, edumazet, kuba, pabeni, Israel Cueto From: Israel Cueto <github@bumblecito.com> The ODI DFP-34X-2C3 XPON SFP module supports 2500Base-X. Add a quirk to enable 2500Base-X support for this module. Tested on a Horaco ZX-SWTGW2C8F switch with an ODI DFP-34X-2C3 module. A 2500 Mb/s link was established with speed and duplex forced and autonegotiation disabled. Signed-off-by: Israel Cueto <github@bumblecito.com> --- Changes in v2: - Move the ODI quirk to its alphabetical position. drivers/net/phy/sfp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c index 915156743..960ac89cc 100644 --- a/drivers/net/phy/sfp.c +++ b/drivers/net/phy/sfp.c @@ -614,6 +614,9 @@ static const struct sfp_quirk sfp_quirks[] = { SFP_QUIRK("Lantech", "8330-265D", sfp_quirk_2500basex, sfp_fixup_ignore_los), + // ODI DFP-34X-2C3 XPON stick can operate at 2500base-X + SFP_QUIRK_S("ODI", "DFP-34X-2C3", sfp_quirk_2500basex), + SFP_QUIRK_S("UBNT", "UF-INSTANT", sfp_quirk_ubnt_uf_instant), // Walsun HXSX-ATR[CI]-1 don't identify as copper, and use the -- 2.34.1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next v2] net: sfp: add 2500base-X quirk for ODI DFP-34X-2C3 2026-11-18 3:45 ` [PATCH net-next v2] " github @ 2026-11-18 13:35 ` Andrew Lunn 2026-11-22 3:54 ` netdev-bot+sashiko 1 sibling, 0 replies; 6+ messages in thread From: Andrew Lunn @ 2026-11-18 13:35 UTC (permalink / raw) To: github Cc: netdev, linux-kernel, linux, hkallweit1, davem, edumazet, kuba, pabeni On Wed, Nov 18, 2026 at 03:45:10AM +0000, github@bumblecito.com wrote: > From: Israel Cueto <github@bumblecito.com> > > The ODI DFP-34X-2C3 XPON SFP module supports 2500Base-X. > > Add a quirk to enable 2500Base-X support for this module. > > Tested on a Horaco ZX-SWTGW2C8F switch with an ODI > DFP-34X-2C3 module. A 2500 Mb/s link was established > with speed and duplex forced and autonegotiation disabled. > > Signed-off-by: Israel Cueto <github@bumblecito.com> > --- > Changes in v2: > - Move the ODI quirk to its alphabetical position. Thanks for trying to keep the list somewhat sorted. However, you need to start a new thread for every new version of the patch. If you have time, could you add a second patch and move OEM and Turris into order? Not required to get this patch merged, just nice to have. Andrew --- pw-bot: cr ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next v2] net: sfp: add 2500base-X quirk for ODI DFP-34X-2C3 2026-11-18 3:45 ` [PATCH net-next v2] " github 2026-11-18 13:35 ` Andrew Lunn @ 2026-11-22 3:54 ` netdev-bot+sashiko 1 sibling, 0 replies; 6+ messages in thread From: netdev-bot+sashiko @ 2026-11-22 3:54 UTC (permalink / raw) To: github Cc: netdev, linux-kernel, linux, andrew, hkallweit1, davem, edumazet, kuba, pabeni Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider. Critical: 0 · High: 0 · Medium: 1 · Low: 1 If you believe none of the issues are legitimate, please reply to each issue of Medium severity or higher and explain why the AI is wrong. If any of them are legitimate and you plan to respin, please let patchwork know by including "pw-bot: cr" as a separate line at the end of your reply (one such reply per series is enough). - [Medium] The new sfp_quirks[] entry SFP_QUIRK_S("ODI", "DFP-34X-2C3", sfp_quirk_2500basex) in drivers/net/phy/sfp.c (lines 617-618) has a… - [Low] The new ODI DFP-34X-2C3 entry uses only sfp_quirk_2500basex (drivers/net/phy/sfp.c:485-491). -- net: sfp: add 2500base-X quirk for ODI DFP-34X-2C3 This adds an sfp_quirks[] entry for the ODI DFP-34X-2C3 XPON SFP module so that sfp_quirk_2500basex() advertises 2500base-X for it. It was tested on a Horaco ZX-SWTGW2C8F switch with speed and duplex forced and autonegotiation disabled. > diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c > index 915156743701b..960ac89cc2a0b 100644 > --- a/drivers/net/phy/sfp.c > +++ b/drivers/net/phy/sfp.c > @@ -614,6 +614,9 @@ static const struct sfp_quirk sfp_quirks[] = { > SFP_QUIRK("Lantech", "8330-265D", sfp_quirk_2500basex, > sfp_fixup_ignore_los), > > + // ODI DFP-34X-2C3 XPON stick can operate at 2500base-X > + SFP_QUIRK_S("ODI", "DFP-34X-2C3", sfp_quirk_2500basex), [Severity: Medium] Should this entry also use sfp_fixup_ignore_tx_fault_and_los()? SFP_QUIRK_S() sets .fixup to NULL. The SFP state machine therefore still acts on this module's TX_FAULT and LOS signals. The other Realtek RTL960x GPON/XPON ONT sticks in sfp_quirks[] ignore both signals: SFP_QUIRK("HSGQ", "HSGQ-XPON-Stick", sfp_quirk_2500basex, sfp_fixup_ignore_tx_fault_and_los), HUAWEI MA5671A, Hisense-Leox LXT-010S-H and Hisense ZNID-GPON-2311NA do the same. Commit 95aca8602ef70ffd ("net: sfp: add quirks for Hisense and HSGQ GPON ONT SFP modules") says TX_FAULT must be ignored "during the module's ~40s Linux boot time". Commit 0fd5dfa99cfc75 ("net: sfp: ignore LOS also on Hisense GPON modules") added LOS ignoring. This keeps the module reachable for configuration when no fiber is connected. The HSGQ stick is often said to be a rebranded ODI, but I could not confirm that from the tree. If the ODI stick behaves the same way, can a cold plug use up all the retries in sfp_sm_fault()? It gets N_FAULT_INIT retries spaced T_FAULT_RECOVER apart, which is about 5 seconds in total. Then it does: drivers/net/phy/sfp.c:sfp_sm_fault() { if (sfp->sm_fault_retries && !--sfp->sm_fault_retries) { dev_err(sfp->dev, "module persistently indicates fault, disabling\n"); sfp_sm_next(sfp, SFP_S_TX_DISABLE, 0); ... } Also, with no fiber connected, would an asserted LOS keep the link down? That would leave the stick's management interface unreachable. The commit message does not say how this module drives TX_FAULT and LOS, or whether fiber was connected during the test. Could that be added? Or, if the module does not need these fixups, could the message say why it differs from its siblings? [Severity: Low] The commit message says the 2500 Mb/s link came up "with speed and duplex forced and autonegotiation disabled". However, sfp_quirk_2500basex() does not clear ETHTOOL_LINK_MODE_Autoneg_BIT: static void sfp_quirk_2500basex(const struct sfp_eeprom_id *id, struct sfp_module_caps *caps) { linkmode_set_bit(ETHTOOL_LINK_MODE_2500baseX_Full_BIT, caps->link_modes); __set_bit(PHY_INTERFACE_MODE_2500BASEX, caps->interfaces); } phylink_get_inband_type() maps PHY_INTERFACE_MODE_2500BASEX to INBAND_BASEX. Consider a Base-X SFP with no PHY, on a PCS that supports both in-band modes (pcs-mtk-lynxi, for example). Because Autoneg is still advertised, phylink_pcs_neg_mode() picks PHYLINK_PCS_NEG_INBAND_ENABLED. The default configuration from this quirk therefore runs in-band AN, which is not the configuration that was tested. If the module can't do in-band AN at 2500base-X, does it also need sfp_quirk_disable_autoneg()? sfp_quirk_oem_2_5g() already calls it. Without it, users would have to run "ethtool -s ... autoneg off" by hand. On the other hand, commit 95aca8602ef70ffd reports a 2.5Gbps link with the sibling HSGQ stick on a Banana Pi R3 (MT7986) using the default quirk. So the need to disable AN may come from the host's PCS, not the module. Could the commit message say which kernel and PCS driver the Horaco switch was running? Separately, this isn't a bug, but the comments on the other sfp_quirk_2500basex entries say what the EEPROM misreports, for example "1000BASE-LX / 1300MBd" or "1.2GBd NRZ". Could the new comment say the same for this module? > SFP_QUIRK_S("UBNT", "UF-INSTANT", sfp_quirk_ubnt_uf_instant), > > // Walsun HXSX-ATR[CI]-1 don't identify as copper, and use the -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261118034510.434732-1-github%40bumblecito.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] net: sfp: add 2500base-X quirk for ODI DFP-34X-2C3 2026-11-18 2:56 [PATCH net-next] net: sfp: add 2500base-X quirk for ODI DFP-34X-2C3 github 2026-11-18 3:28 ` Jakub Kicinski 2026-11-18 3:45 ` [PATCH net-next v2] " github @ 2026-11-22 3:23 ` netdev-bot+sashiko 2 siblings, 0 replies; 6+ messages in thread From: netdev-bot+sashiko @ 2026-11-22 3:23 UTC (permalink / raw) To: github Cc: netdev, linux-kernel, linux, andrew, hkallweit1, davem, edumazet, kuba, pabeni Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider. Critical: 0 · High: 0 · Medium: 2 · Low: 2 If you believe none of the issues are legitimate, please reply to each issue of Medium severity or higher and explain why the AI is wrong. If any of them are legitimate and you plan to respin, please let patchwork know by including "pw-bot: cr" as a separate line at the end of your reply (one such reply per series is enough). - [Medium] The new quirk SFP_QUIRK_S("ODI", "DFP-34X-2C3", sfp_quirk_2500basex) in the sfp_quirks[] table… - [Medium] The ODI DFP-34X-2C3 is added with SFP_QUIRK_S (fixup = NULL), so its TX_FAULT and LOS signals are used as-is. - [Low] The commit message and the new comment ('// ODI DFP-34X-2C3 XPON stick can operate at 2500base-X') do not say what the module's EEPROM… - [Low] The new 'ODI' entry in sfp_quirks[] (drivers/net/phy/sfp.c:609-610) sits between the 'HSGQ' and 'Lantech'… -- net: sfp: add 2500base-X quirk for ODI DFP-34X-2C3 This adds an entry to sfp_quirks[] for the ODI DFP-34X-2C3 XPON SFP module. The entry uses sfp_quirk_2500basex to enable 2500base-X. The commit message says it was tested on a Horaco ZX-SWTGW2C8F switch with speed and duplex forced and autonegotiation disabled. > diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c > index 915156743701b..666e515d27623 100644 > --- a/drivers/net/phy/sfp.c > +++ b/drivers/net/phy/sfp.c > @@ -606,6 +606,9 @@ static const struct sfp_quirk sfp_quirks[] = { > SFP_QUIRK("HSGQ", "HSGQ-XPON-Stick", sfp_quirk_2500basex, > sfp_fixup_ignore_tx_fault_and_los), > > + // ODI DFP-34X-2C3 XPON stick can operate at 2500base-X [Severity: Low] What does this module's EEPROM report? Each neighbouring 2500base-X entry names the EEPROM defect, for example: // HSGQ HSGQ-XPON-Stick can operate at 2500base-X, but reports // 1000BASE-LX / 1300MBd in its EEPROM sfp_module_parse_support() in drivers/net/phy/sfp-bus.c can already set 2500base-X from the bitrate fields: if (linkmode_empty(modes) && br_nom) { ... if (br_min <= 3200 && br_max >= 2500) { phylink_set(modes, 2500baseX_Full); Could the comment and the commit message give the reported bitrate and compliance codes? That would show why the generic parsing doesn't already enable 2500base-X for this module. > + SFP_QUIRK_S("ODI", "DFP-34X-2C3", sfp_quirk_2500basex), [Severity: Medium] Will the link come up with default settings? The commit message only describes this test: "A 2500 Mb/s link was established with speed and duplex forced and autonegotiation disabled." sfp_quirk_2500basex() adds 2500baseX_Full and PHY_INTERFACE_MODE_2500BASEX. It does not clear Autoneg, and sfp_module_parse_support() always sets it: phylink_set(modes, Autoneg); In phylink, phylink_get_inband_type() treats 2500base-X as INBAND_BASEX. As a result, phylink_sfp_config_optical() keeps Autoneg in the advertising mask, and a PCS that supports in-band AN at 2500base-X will try in-band negotiation by default. If the module doesn't answer in-band AN at 2500base-X, would the default link stay down until someone runs ethtool by hand? The driver already has sfp_quirk_disable_autoneg(), and sfp_quirk_oem_2_5g() combines it with a 2.5G mode: __set_bit(PHY_INTERFACE_MODE_2500BASEX, caps->interfaces); sfp_quirk_disable_autoneg(id, caps); Does this module need the same treatment? If not, has the default AN-enabled configuration been tested? [Severity: Medium] SFP_QUIRK_S leaves the fixup NULL, so this module's TX_FAULT and LOS signals are used as-is. Is that intended for an XPON stick? The HSGQ XPON stick just above, and the Hisense GPON sticks, all use: sfp_fixup_ignore_tx_fault_and_los Commit 95aca8602ef70f ("net: sfp: add quirks for Hisense and HSGQ GPON ONT SFP modules") says these RTL960x-based sticks assert TX_FAULT while their Linux image boots, which takes about 40 seconds. Commit 0fd5dfa99cfc75 ("net: sfp: ignore LOS also on Hisense GPON modules") masked LOS so the stick can be configured with no fiber connected. If the ODI stick behaves the same way, a TX_FAULT held that long would use up the N_FAULT_INIT retries in sfp_sm_fault(): if (sfp->sm_fault_retries && !--sfp->sm_fault_retries) { dev_err(sfp->dev, "module persistently indicates fault, disabling\n"); sfp_sm_next(sfp, SFP_S_TX_DISABLE, 0); LOS asserted without fiber would also keep the host link down. The commit message reports no TX_FAULT or LOS behaviour from the test board. Does the Horaco ZX-SWTGW2C8F cage wire these signals? If it doesn't, this path would not have been exercised. [Severity: Low] This isn't a bug, but this part of sfp_quirks[] is sorted by vendor name (... HSGQ, Lantech, UBNT, Walsun, YV). Should the ODI entry go after the Lantech entries and before UBNT? > + > // Lantech 8330-262D-E and 8330-265D can operate at 2500base-X, but > // incorrectly report 2500MBd NRZ in their EEPROM. > // Some 8330-265D modules have inverted LOS, while all of them report -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261118025602.171615-1-github%40bumblecito.com ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-11-22 3:54 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2026-11-18 2:56 [PATCH net-next] net: sfp: add 2500base-X quirk for ODI DFP-34X-2C3 github 2026-11-18 3:28 ` Jakub Kicinski 2026-11-18 3:45 ` [PATCH net-next v2] " github 2026-11-18 13:35 ` Andrew Lunn 2026-11-22 3:54 ` netdev-bot+sashiko 2026-11-22 3:23 ` [PATCH net-next] " netdev-bot+sashiko
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®