* [PATCH] net: sfp: add quirk for Potron SFP+ XGSPON ONU Stick
@ 2025-06-05 22:17 Chris Morgan
2025-06-05 22:38 ` Russell King (Oracle)
0 siblings, 1 reply; 2+ messages in thread
From: Chris Morgan @ 2025-06-05 22:17 UTC (permalink / raw)
To: netdev
Cc: linux, andrew, hkallweit1, davem, edumazet, kuba, pabeni,
Chris Morgan
From: Chris Morgan <macromorgan@hotmail.com>
Add quirk for Potron SFP+ XGSPON ONU Stick (YV SFP+ONT-XGSPON).
This device uses pins 2 and 7 for UART communication, so disable
TX_FAULT and LOS. Additionally as it is an embedded system in an
SFP+ form factor provide it enough time to fully boot before we
attempt to use it.
https://www.potrontec.com/index/index/list/cat_id/2.html#11-83
https://pon.wiki/xgs-pon/ont/potron-technology/x-onu-sfpp/
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
drivers/net/phy/sfp.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c
index 347c1e0e94d9..b15eb60a0382 100644
--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
@@ -412,6 +412,18 @@ static void sfp_fixup_halny_gsfp(struct sfp *sfp)
sfp->state_hw_mask &= ~(SFP_F_TX_FAULT | SFP_F_LOS);
}
+static void sfp_fixup_potron(struct sfp *sfp)
+{
+ /*
+ * The TX_FAULT and LOS pins on this device are used for serial
+ * communication, so ignore them. Additionally, provide extra
+ * time for this device to fully start up.
+ */
+
+ sfp_fixup_long_startup(sfp);
+ sfp->state_hw_mask &= ~(SFP_F_TX_FAULT | SFP_F_LOS);
+}
+
static void sfp_fixup_rollball_cc(struct sfp *sfp)
{
sfp_fixup_rollball(sfp);
@@ -512,6 +524,8 @@ static const struct sfp_quirk sfp_quirks[] = {
SFP_QUIRK_F("Walsun", "HXSX-ATRC-1", sfp_fixup_fs_10gt),
SFP_QUIRK_F("Walsun", "HXSX-ATRI-1", sfp_fixup_fs_10gt),
+ SFP_QUIRK_F("YV", "SFP+ONU-XGSPON", sfp_fixup_potron),
+
// OEM SFP-GE-T is a 1000Base-T module with broken TX_FAULT indicator
SFP_QUIRK_F("OEM", "SFP-GE-T", sfp_fixup_ignore_tx_fault),
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: sfp: add quirk for Potron SFP+ XGSPON ONU Stick
2025-06-05 22:17 [PATCH] net: sfp: add quirk for Potron SFP+ XGSPON ONU Stick Chris Morgan
@ 2025-06-05 22:38 ` Russell King (Oracle)
0 siblings, 0 replies; 2+ messages in thread
From: Russell King (Oracle) @ 2025-06-05 22:38 UTC (permalink / raw)
To: Chris Morgan
Cc: netdev, andrew, hkallweit1, davem, edumazet, kuba, pabeni,
Chris Morgan
On Thu, Jun 05, 2025 at 05:17:30PM -0500, Chris Morgan wrote:
> +static void sfp_fixup_potron(struct sfp *sfp)
> +{
> + /*
> + * The TX_FAULT and LOS pins on this device are used for serial
> + * communication, so ignore them. Additionally, provide extra
> + * time for this device to fully start up.
> + */
> +
> + sfp_fixup_long_startup(sfp);
> + sfp->state_hw_mask &= ~(SFP_F_TX_FAULT | SFP_F_LOS);
This should be calling sfp_fixup_ignore_tx_fault(), and possibly
sfp_fixup_ignore_los() as well if the module also reports incorrect
soft LOS state or doesn't support soft LOS state reporting.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-06-05 22:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-05 22:17 [PATCH] net: sfp: add quirk for Potron SFP+ XGSPON ONU Stick Chris Morgan
2025-06-05 22:38 ` Russell King (Oracle)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).