mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: github@bumblecito.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux@armlinux.org.uk, andrew@lunn.ch, hkallweit1@gmail.com,
	davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
	pabeni@redhat.com
Subject: Re: [PATCH net-next v2] net: sfp: add 2500base-X quirk for ODI DFP-34X-2C3
Date: Sun, 22 Nov 2026 03:54:20 +0000	[thread overview]
Message-ID: <179531966042.3135.7432680981389421641@kernel.org> (raw)
In-Reply-To: <20261118034510.434732-1-github@bumblecito.com>

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

  parent reply	other threads:[~2026-11-22  3:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18  2:56 [PATCH net-next] " 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 [this message]
2026-11-22  3:23 ` [PATCH net-next] " netdev-bot+sashiko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179531966042.3135.7432680981389421641@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=github@bumblecito.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®