Skip to content

Commit 34a8909

Browse files
macromorgangregkh
authored andcommitted
net: sfp: add quirk for Potron SFP+ XGSPON ONU Stick
[ Upstream commit dfec1c1 ] 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> Link: https://patch.msgid.link/20250617180324.229487-1-macroalpha82@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 7edb8ab commit 34a8909

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

drivers/net/phy/sfp.c

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,11 @@ static void sfp_fixup_ignore_tx_fault(struct sfp *sfp)
360360
sfp->state_ignore_mask |= SFP_F_TX_FAULT;
361361
}
362362

363+
static void sfp_fixup_ignore_hw(struct sfp *sfp, unsigned int mask)
364+
{
365+
sfp->state_hw_mask &= ~mask;
366+
}
367+
363368
static void sfp_fixup_nokia(struct sfp *sfp)
364369
{
365370
sfp_fixup_long_startup(sfp);
@@ -408,7 +413,19 @@ static void sfp_fixup_halny_gsfp(struct sfp *sfp)
408413
* these are possibly used for other purposes on this
409414
* module, e.g. a serial port.
410415
*/
411-
sfp->state_hw_mask &= ~(SFP_F_TX_FAULT | SFP_F_LOS);
416+
sfp_fixup_ignore_hw(sfp, SFP_F_TX_FAULT | SFP_F_LOS);
417+
}
418+
419+
static void sfp_fixup_potron(struct sfp *sfp)
420+
{
421+
/*
422+
* The TX_FAULT and LOS pins on this device are used for serial
423+
* communication, so ignore them. Additionally, provide extra
424+
* time for this device to fully start up.
425+
*/
426+
427+
sfp_fixup_long_startup(sfp);
428+
sfp_fixup_ignore_hw(sfp, SFP_F_TX_FAULT | SFP_F_LOS);
412429
}
413430

414431
static void sfp_fixup_rollball_cc(struct sfp *sfp)
@@ -511,6 +528,8 @@ static const struct sfp_quirk sfp_quirks[] = {
511528
SFP_QUIRK_F("Walsun", "HXSX-ATRC-1", sfp_fixup_fs_10gt),
512529
SFP_QUIRK_F("Walsun", "HXSX-ATRI-1", sfp_fixup_fs_10gt),
513530

531+
SFP_QUIRK_F("YV", "SFP+ONU-XGSPON", sfp_fixup_potron),
532+
514533
// OEM SFP-GE-T is a 1000Base-T module with broken TX_FAULT indicator
515534
SFP_QUIRK_F("OEM", "SFP-GE-T", sfp_fixup_ignore_tx_fault),
516535

0 commit comments

Comments
 (0)