Re: [PATCH net-next v2] net: sfp: add 2500base-X quirk for ODI DFP-34X-2C3
From: netdev-bot+sashiko
Date: Sat Nov 21 2026 - 22:54:25 EST
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