From: Martino Dell'Ambrogio <tillo@tillo.ch>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, linux@armlinux.org.uk, andrew@lunn.ch,
hkallweit1@gmail.com, davem@davemloft.net, edumazet@google.com,
pabeni@redhat.com, maxime.chevallier@bootlin.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2 2/2] net: sfp: add quirks for OEM XGSPONST2001 and FS XGS-SFP-ONT-MACI
Date: Wed, 12 Aug 2026 17:12:51 +0200 [thread overview]
Message-ID: <20260812151252.1160944-1-tillo@tillo.ch> (raw)
In-Reply-To: <20260811001429.1036686-1-kuba@kernel.org>
On Mon, 10 Aug 2026 17:14:29 -0700, Jakub Kicinski wrote:
> That leaves two possibilities for this module. Either the PN field really
> does read "XGS-SFP-ONT-MACI" and SFP_QUIRK_F() would have matched just as
> well, so the commit message statement
> [...]
> does not hold for this entry, or the field really does contain garbage,
> which then falls inside the 16 compared bytes and neither prefix nor exact
> matching can ever fire, making the new entry dead code.
>
> Which of the two is it, and could the comment and the commit message be
> adjusted to describe what the code actually does here?
It's the first one: the field really does read "XGS-SFP-ONT-MACI". The
product name is XGS-SFP-ONT-MAC-I; the last hyphen does not fit the
16-byte field, so the field is fully occupied by legitimate characters
and there is nothing left to pad, with garbage or otherwise. I re-read
the module I have in service to make sure:
vendor "FS" + 14 spaces (properly padded)
PN 58 47 53 2d 53 46 50 2d 4f 4e 54 2d 4d 41 43 49 "XGS-SFP-ONT-MACI"
So prefix and exact matching are indeed identical here, and the "Both
modules fail to space-pad" paragraph overclaims. In v3 this entry
becomes a plain SFP_QUIRK_F, and the commit message makes the
garbage-padding argument only for the XGSPONST2001, where it actually
holds: that stick returns the 12 legitimate characters followed by '!'
and non-printable bytes in the PN field on cold power-up (the same
module reads back clean and space-padded after a warm reseat). The
cold boot is exactly where the quirk has to land, otherwise TX_FAULT
is honored and the state machine disables the module.
> Would it be worth either noting in the comments that the vendor field is
> matched as a prefix too, or splitting the flag so prefix semantics only
> apply to the part field?
Splitting it. v3 scopes the flag to the part field (see my reply on
1/2) and the comments follow.
Thanks,
Martino
prev parent reply other threads:[~2026-08-12 15:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 7:43 [PATCH net-next v2 0/2] net: sfp: quirk support for XGS-PON ONT sticks with unclean EEPROMs Martino Dell'Ambrogio
2026-08-06 7:43 ` [PATCH net-next v2 1/2] net: sfp: allow prefix matching in quirk lookup Martino Dell'Ambrogio
2026-08-11 0:14 ` Jakub Kicinski
2026-08-12 15:12 ` Martino Dell'Ambrogio
2026-08-06 7:43 ` [PATCH net-next v2 2/2] net: sfp: add quirks for OEM XGSPONST2001 and FS XGS-SFP-ONT-MACI Martino Dell'Ambrogio
2026-08-11 0:14 ` Jakub Kicinski
2026-08-12 15:12 ` Martino Dell'Ambrogio [this message]
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=20260812151252.1160944-1-tillo@tillo.ch \
--to=tillo@tillo.ch \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=maxime.chevallier@bootlin.com \
--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®