Article View: linux.kernel.netdev
Article #20336Re: [PATCH net-next v2] net: sfp: add 2500base-X quirk for ODI DFP-34X-2C3
From: netdev-bot+sashiko
Date: Sun, 22 Nov 2026 03:54
Date: Sun, 22 Nov 2026 03:54
122 lines
12835 bytes
12835 bytes
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
Technical Details
Message-ID:
<179531966042.3135.7432680981389421641@kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368574-linux-kernel-netdev=dewy.ruReferences:
<20261118034510.434732-1-github@bumblecito.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368574-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev 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 Organization: Usenet Network Message-ID: <179531966042.3135.7432680981389421641@kernel.org> References: <20261118034510.434732-1-github@bumblecito.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3564837"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:FGZ84u2AgB/RJwYx7CIulpbDDmc= sha256:qFOERtJkWJFHfoYQ5HEhcTbFYawd0WMdZ0S++Ob9jiI= sha1:KC6YswIDLA4EsrHf/QtkU0SXibg= sha256:vvfilbP6YIrhfqH8S632a9+sJGjt11BKLg721q62zN0= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id E6D29125D6F; Sun, 22 Nov 2026 06:54:42 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.4 X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zVFck87rP7Zx; Sun, 22 Nov 2026 06:54:34 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-368574-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 24482DFFA1; Sun, 22 Nov 2026 06:54:25 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 5E64A37E0C; Sun, 22 Nov 2026 03:54:23 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795319662; b=QMFJdjHgd8r10y9ZBQXPXbvpyR37EbtMNnWyHPujzRQvaOS2d2bNawVYBrQb4Z5VEe/T ke/N/AwwZpW/Y5HvwDalFEMscQ43T0pSkxC2yBItE/libTqLgS2mjWIXHYvCnKs1m4drU pd5TUMHfJztbhnwwQcvKlC9N4Z1+JhtyyEHoN2TwaA+l+Js/PTTiJmMrbASd4/R2aE+45 GeL1H/aNZ9WwAM93V3U0uyuc0t0ai1RFZ5JpD8nxjpL5ehZApp7294prVlMA5cVrs+Ar+ La8gcWtfP8CAWlZmGIlk7MAckVSPdu282snfins0z7r/6AvKYdfJmq3SaHZmszH2TZg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795319662; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=fQMcubyEGLJDkcZ4DTTyA3Id5oJxjLW06dRC7LXqSD8=; b=C2steoEKiKYj38MCJBGcADoPy5YSgVWo8i6k5KWBROPy01SavEFvTFQKxXNVNyglwJGk hEljPJWRLcnafGO8n18N9ZNWIFjUTtdEjwzsEv0biscIAfwKYo7E05q+/jBD7Wy4qzCFy MpakFey2rzTuRlKwINm4e9zcgU57W8sr3jAszdsDy868FAQnmhfyN0KYharwrqXgSXMAm /XMfdj1pKZ+AzcSgy2z3JhceCLnI9zv8hfKIl0bxi8CSDcQOgmsAU2NCSrZ+HJZ/jB9z2 TMK2cCJEU+7/hEb2YyBiNWYryLgqfjhpaT5JWLbdfN9ALDuBGRoNPiGy/v4NNxklBkA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=PxXEN2wD; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 71CFD606A33A; Sun, 22 Nov 2026 03:54:22 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=PxXEN2wD X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795319661; b=Q+u9ipGvjgt1nC4/d3RBnOTy6SVrh9W2YFRhOQse9bYBx0UWcptJrm7rGRv2EB81XLTd Zg3GauS0lP1PEh/mzPhAGxzBpSy0K/fk7O3U3h+Vz0XQu5jXJNs23MY/mq06gs3qXBIYd 87TrNgRWOhqHU4B1aBnZD1l9zyQWh5TtOnl0GIAop4jsQ0MnFXoosL6tjKTZZd0G4GwNL xf0BvFr4v27EJl25P50wJNbV9IjEZnvEoC9cKNEOXR+AlVJODu9evFXfEDW2vDTUcIkdu dND5vDc6kuFrzitGqopaff5moySiccazFjT66PmGyGceNbUV0l2YIVr5SZSDanCL+Dw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795319661; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=fQMcubyEGLJDkcZ4DTTyA3Id5oJxjLW06dRC7LXqSD8=; b=ijKi+I/tJczaljxE7+eaxLiR7RFUOK8hrGMm3iEhNMXqIfVo3aLcQcD8oU0KMZ83fSxL csI4sRrxJF/sOoDt7S4drWTMue/8utEy93FOKjZplqwfTXxf2IYatAioEAJPXJIIiPd8R qqP7BqH9MVzKEmKAUROzbuy4xhMUQ6bzV3gTJ1yHtV8D+rvK6Afr735IvKqFO5Fgv1UJu ct2EalAXUSIigY5oCFywajsIh4lWEeMOJmNykwP6XMQTwdesuKMhPsF7SDe800n+i966h 7HWw4ypGX8mdNk/KTEsPF272YMubaIphugdIvEdm8wV7KFvjk7W1OokwujyszqyVs9A== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=PxXEN2wD; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9154A606A320; Sun, 22 Nov 2026 03:54:21 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6A4C1F000C0; Sun, 22 Nov 2026 03:54:20 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795319661; bh=fQMcubyEGLJDkcZ4DTTyA3Id5oJxjLW06dRC7LXqSD8=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=PxXEN2wDc6p5i8Oq29JkzmrQ127/499ioh0oRAdUIOdTh5Y9eoHqd36eBSM7czt8a lgaYPCl24VbcfHdXXJgYqCy/ZVqlGOpR4d2nv4zutDBPnRuuEjraTpc/Rn5rsmK9BF d0mmNxIkbkCL2M6H9/Q/ROzWZzlJAL6sMxpcU+eC5E/yk0gOpoq5946mJZ/Jt8w8UI kGZpxkhuGaC4q+jHOtN2IyWH0LwlkeIZS70pBenXcgKv+6zvP7jzXm7GgjC0OBiEfN jQkseteln6dlqaELg/HokrXVlt9k8rfZOf6MWQyBSXoAoOzYtPIayiG6KeJ2iwFfl8 BSThVr8jwSlLQ== X-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 X-In-Reply-To: <20261118034510.434732-1-github@bumblecito.com> X-sashiko-severity: Medium X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list