* [PATCH net] net: sfp: ignore soft LOS on FS XGS-SFP-ONT-MACI
@ 2026-10-04 11:44 Yago
2026-10-08 16:47 ` Jakub Kicinski
0 siblings, 1 reply; 2+ messages in thread
From: Yago @ 2026-10-04 11:44 UTC (permalink / raw)
To: Russell King
Cc: netdev, Andrew Lunn, Jakub Kicinski, Paolo Abeni, Eric Dumazet,
Martino Dell'Ambrogio
The FS XGS-SFP-ONT-MACI (MaxLinear PRX126 XGS-PON ONU stick) got the
potron fixup, which masks the TX_FAULT and LOS hardware pins. That is
not enough for this module: it advertises soft RX_LOS
(SFP_ENHOPTS_SOFT_RX_LOS, enhanced options byte 0xf6) and its EEPROM is
bridged from the internal optics, so the diagnostics status byte carries
a real LOS bit. Because potron only clears the LOS bit in state_hw_mask
and does not set it in state_ignore_mask, sfp_soft_start_poll() adds
SFP_F_LOS to state_soft_mask and the LOS bit is polled from the
diagnostics page instead. The module asserts it whenever there is no PON
light.
The result is that without fibre the state machine stays in
SFP_S_WAIT_LOS and the host link never comes up, so the stick's
management interface (used to configure the ONU serial, MIB and VLANs
before the fibre is connected) is unreachable. Add a fixup that keeps
the potron behaviour and additionally ignores LOS, and use it for this
module.
Tested on a Banana Pi BPI-R4 (MT7988A). With the plain potron fixup and
no fibre, sfp-wan comes up and drops ~30 ms later and the stick is
unreachable. With this fixup and no fibre, the diagnostics LOS bit reads
asserted for the whole test while the host link stays up and the stick
stays reachable. With fibre connected, behaviour is unchanged and the
ONU registers with the OLT.
Fixes: 03fa69146f2f ("net: sfp: add quirks for OEM XGSPONST2001 and FS XGS-SFP-ONT-MACI")
Signed-off-by: Yago <yago@yago.blog>
---
drivers/net/phy/sfp.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c
index 96361584791b..345069b8a25b 100644
--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
@@ -472,6 +472,20 @@ static void sfp_fixup_potron(struct sfp *sfp)
sfp_fixup_ignore_hw(sfp, SFP_F_TX_FAULT | SFP_F_LOS);
}
+static void sfp_fixup_potron_ignore_los(struct sfp *sfp)
+{
+ /*
+ * In addition to the potron fixup, this module implements soft LOS
+ * (enhanced options 0xf6), so masking the hardware pins is not enough:
+ * the state machine would fall back to the LOS bit polled from the
+ * diagnostics page, which the module asserts whenever there is no PON
+ * light. Ignore LOS entirely so the host link, and thus the module's
+ * management interface, stays up without fibre.
+ */
+ sfp_fixup_potron(sfp);
+ sfp_fixup_ignore_los(sfp);
+}
+
static void sfp_fixup_rollball_cc(struct sfp *sfp)
{
sfp_fixup_rollball(sfp);
@@ -572,10 +586,11 @@ static const struct sfp_quirk sfp_quirks[] = {
// Fiberstore XGS-SFP-ONT-MACI is a MAC-mode XGS-PON ONT stick with
// ONT-class serial-passthrough TX_FAULT/LOS wiring and slow startup;
- // mask both signals and extend T_START_UP via the potron fixup. The
+ // mask both signals and extend T_START_UP via the potron fixup. It
+ // also implements soft LOS, so ignore LOS entirely (see fixup). The
// PN is the product name (XGS-SFP-ONT-MAC-I) truncated at the 16-byte
// field width, so the field is fully occupied and matches exactly.
- SFP_QUIRK_F("FS", "XGS-SFP-ONT-MACI", sfp_fixup_potron),
+ SFP_QUIRK_F("FS", "XGS-SFP-ONT-MACI", sfp_fixup_potron_ignore_los),
SFP_QUIRK_F("HALNy", "HL-GSFP", sfp_fixup_halny_gsfp),
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] net: sfp: ignore soft LOS on FS XGS-SFP-ONT-MACI
2026-10-04 11:44 [PATCH net] net: sfp: ignore soft LOS on FS XGS-SFP-ONT-MACI Yago
@ 2026-10-08 16:47 ` Jakub Kicinski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2026-10-08 16:47 UTC (permalink / raw)
To: Yago
Cc: Russell King, netdev, Andrew Lunn, Paolo Abeni, Eric Dumazet,
Martino Dell'Ambrogio
On Sun, 4 Oct 2026 11:44:08 +0000 Yago wrote:
> Signed-off-by: Yago <yago@yago.blog>
Your legal(ish) name is required to contribute to the kernel.
--
pw-bot: cr
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-08 16:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-04 11:44 [PATCH net] net: sfp: ignore soft LOS on FS XGS-SFP-ONT-MACI Yago
2026-10-08 16:47 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox