From: Paolo Abeni <pabeni@redhat.com>
To: netdev-bot+sashiko@kernel.org, github@bumblecito.com
Cc: linux@armlinux.org.uk, andrew@lunn.ch, hkallweit1@gmail.com,
davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3 1/2] net: sfp: add 2500base-X quirk for ODI DFP-34X-2C3
Date: Tue, 24 Nov 2026 16:02:33 +0100 [thread overview]
Message-ID: <c6082ed0-cb7c-4e8b-83bf-a85aa3d43eac@redhat.com> (raw)
In-Reply-To: <179520946109.3135.2775052387986633073@kernel.org>
On 11/20/26 22:17, netdev-bot+sashiko@kernel.org wrote:
> 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 only test reported is a 2500 Mb/s link brought up after
> speed and duplex were forced and autonegotiation was disabled by hand.
> - [Low] The patch adds SFP_QUIRK_S("ODI", "DFP-34X-2C3",
> sfp_quirk_2500basex) to sfp_quirks[] in drivers/net/phy/sfp.c (lines…
>
> --
>
> net: sfp: add 2500base-X quirk for ODI DFP-34X-2C3
>
> This commit adds an entry to sfp_quirks[] that applies
> sfp_quirk_2500basex to the ODI DFP-34X-2C3 XPON module. 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: Low]
> What does this module actually report in its EEPROM?
>
> sfp_module_parse_support() in drivers/net/phy/sfp-bus.c can already turn
> on 2500base-X without a quirk in two cases. One is the FC speed bits
> with br_nominal >= 31. The other is the bit-rate fallback:
>
> drivers/net/phy/sfp-bus.c:sfp_module_parse_support() {
> ...
> if (linkmode_empty(modes) && br_nom) {
> ...
> if (br_min <= 3200 && br_max >= 2500) {
> phylink_set(modes, 2500baseX_Full);
> __set_bit(PHY_INTERFACE_MODE_2500BASEX, interfaces);
> }
> }
> ...
> }
>
> So the quirk is only needed if the EEPROM falls outside both rules. A
> typical case is an xPON stick that reports 1000BASE-LX at about 1300MBd.
>
> Most of the nearby xPON entries record this as "can operate at
> 2500base-X, but reports <X> in its EEPROM". Examples are Huawei MA5671A,
> Hisense LXT-010S-H, Hisense ZNID-GPON-2311NA, HSGQ, FS GPON-ONU-34-20BI
> and Alcatel G010SP. The OEM SFP-2.5G-BX10-D/U and LH03-B/LH20-A entries
> have no such comment, though.
>
> Could the commit message and the table comment say what the module
> reports for nominal bit rate, BR min/max and compliance codes? The
> vendor name and PN strings would help too, for example from ethtool -m.
> The strings matter because sfp_lookup_quirk() needs an exact vendor/part
> match after trimming.
>
> The later commit "net: sfp: sort OEM and Turris SFP quirks" does not
> change this entry.
>
> [Severity: Medium]
> Does the link come up with this entry under the default phylink
> configuration?
>
> The commit message says the link was established "with speed and duplex
> forced and autonegotiation disabled". sfp_quirk_2500basex() only adds
> the link mode and the interface:
>
> 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);
> }
>
> It leaves the Autoneg bit that sfp_module_parse_support() always sets:
>
> phylink_set(modes, Autoneg);
>
> sfp_quirk_oem_2_5g(), by contrast, calls sfp_quirk_disable_autoneg().
>
> With this entry, the default path looks like this:
>
> 1. sfp_module_parse_support() sets Autoneg.
> 2. sfp_quirk_2500basex() adds 2500base-X and keeps Autoneg.
> 3. phylink_choose_sfp_interface() picks 2500base-X.
> 4. phylink_sfp_set_config() uses mode = MLO_AN_INBAND.
> 5. phylink_pcs_neg_mode() takes the Base-X without a PHY branch. When
> the PCS reports no inband caps, or reports both enable and disable,
> the advertised Autoneg bit selects in-band negotiation:
>
> else if (linkmode_test_bit(ETHTOOL_LINK_MODE_Autoneg_BIT,
> advertising))
> neg_mode = PHYLINK_PCS_NEG_INBAND_ENABLED;
>
> Suppose the module's 2500base-X SerDes does not do clause 37 style
> in-band negotiation. On such hosts, would users need to run
> ethtool -s ... autoneg off to get a link after inserting the module?
>
> Could the entry also disable autoneg? Alternatively, could the commit
> message confirm that the module links up with in-band AN enabled?
> Several accepted xPON entries also use sfp_quirk_2500basex with Autoneg
> left set, so this may be fine if the module does negotiate.
I think the above should be explicitly debated or addressed.
/P
next prev parent reply other threads:[~2026-11-24 15:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 16:23 [PATCH net-next v3 0/2] net: sfp: add ODI quirk and sort SFP quirk entries github
2026-11-18 16:23 ` [PATCH net-next v3 1/2] net: sfp: add 2500base-X quirk for ODI DFP-34X-2C3 github
2026-11-18 18:15 ` Andrew Lunn
[not found] ` <4fb66a63-b483-4777-9fe4-b94ccbe733b3@SynologyNAS>
2026-11-18 20:32 ` Andrew Lunn
2026-11-18 23:38 ` Andrew Lunn
2026-11-20 21:17 ` netdev-bot+sashiko
2026-11-24 15:02 ` Paolo Abeni [this message]
2026-11-18 16:23 ` [PATCH net-next v3 2/2] net: sfp: sort OEM and Turris SFP quirks github
2026-11-18 18:11 ` Andrew Lunn
2026-11-20 21:17 ` 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=c6082ed0-cb7c-4e8b-83bf-a85aa3d43eac@redhat.com \
--to=pabeni@redhat.com \
--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-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
/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®