net: sfp: quirk support for XGS-PON ONT sticks with unclean EEPROMs
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest2 patches 0 repliesApplied 2/2
- v22 patches 4 repliesSuperseded
- v12 patches 3 repliesSuperseded
Patches in v3 All 2 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | net: sfp: allow prefix matching in quirk lookupdrivers/ drivers/ | +19 | 0 replies | Applied |
| 2/2 | net: sfp: add quirks for OEM XGSPONST2001 and FS XGS-SFP-ONT-MACIdrivers/ | +15 | 0 replies | Applied |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH net-next v3 0/2] net: sfp: quirk support for XGS-PON ONT sticks with unclean EEPROMs
Some clone XGS-PON ONT sticks return EEPROM reads where the vendor PN field contains 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 part-prefix-matching flag to the quirk table so such modules can still be matched; the vendor name is always matched exactly and existing entries behave as before. Patch 2 adds two ONT stick entries wired to the existing potron fixup: the "OEM" XGSPONST2001, which needs the prefix matching (it returns trailing garbage in the PN field on cold power-up reads), and the Fiberstore XGS-SFP-ONT-MACI, whose PN field is fully occupied by the truncated product name and matches exactly.
Both quirks are in production use on a Bananapi BPI-R4 (MT7988A) router on an XGS-PON uplink, backported onto 6.12.
v3, addressing Jakub's review [1][2]:
- prefix matching is now scoped to the part field only; the vendor name comparison is always exact
- the FS XGS-SFP-ONT-MACI entry is back to plain SFP_QUIRK_F: its PN field carries the full 16-character truncated product name, so prefix matching bought it nothing
- commit messages reworded accordingly; patch 1 now describes the mechanism only
- dropped the Reviewed-by tags given the functional changes
[1] https://lore.kernel.org/netdev/[email protected]/
[2] https://lore.kernel.org/netdev/[email protected]/
v2 (repost + checkpatch fix): https://lore.kernel.org/netdev/[email protected]/
v1: https://lore.kernel.org/netdev/[email protected]/
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: ac155a26750a595703e7dadff84735456d75a479
Signature · 1 line
2.47.3