Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] net: sfp: quirk support for XGS-PON ONT sticks with unclean EEPROMs
@ 2026-08-06  7:43 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-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
  0 siblings, 2 replies; 3+ messages in thread
From: Martino Dell'Ambrogio @ 2026-08-06  7:43 UTC (permalink / raw)
  To: netdev
  Cc: Russell King, Andrew Lunn, Heiner Kallweit, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Chevallier,
	linux-kernel, Martino Dell'Ambrogio

Some clone XGS-PON ONT sticks ship EEPROMs where the vendor PN field is
filled with non-printable garbage past the legitimate string instead of
the SFF-8472 mandated space padding. sfp_strlen() then can't trim the
field, the exact-length check in sfp_match() rejects the quirk entry
before the string comparison runs, and the quirk silently never applies
— so the kernel honors the module's spurious TX_FAULT and eventually
disables it.

Patch 1 adds an opt-in prefix-matching flag to the quirk table so such
modules can still be matched; existing exact-match entries behave
exactly as before. Patch 2 adds the two entries that need it: the
"OEM" XGSPONST2001 and the Fiberstore XGS-SFP-ONT-MACI, both wired to
the existing potron fixup.

Both quirks are in production use on a Bananapi BPI-R4 (MT7988A)
router on an XGS-PON uplink, backported onto 6.12.

v2, reposted as requested after the July patch-queue flush [1]:
 - collected Maxime's Reviewed-by tags
 - wrapped the SFP_QUIRK_F_PREFIX macro body to fit in 80 columns
   (checkpatch warning flagged by NIPA on v1)
No functional change since v1 [2].

[1] https://lore.kernel.org/netdev/20260720173156.41189431@kernel.org/
[2] https://lore.kernel.org/netdev/20260705185440.136496-1-tillo@tillo.ch/

Martino Dell'Ambrogio (2):
  net: sfp: allow prefix matching in quirk lookup
  net: sfp: add quirks for OEM XGSPONST2001 and FS XGS-SFP-ONT-MACI

 drivers/net/phy/sfp.c | 38 +++++++++++++++++++++++++++++++++-----
 drivers/net/phy/sfp.h |  1 +
 2 files changed, 34 insertions(+), 5 deletions(-)

base-commit: b0057c68df711bf6a62033c072ac61c4f9d3cbc1
-- 
2.47.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-06  7:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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-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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox