Skip to content

Commit 7b7de8a

Browse files
macromorganNipaLocal
authored andcommitted
net: sfp: add quirk for Potron SFP+ XGSPON ONU Stick
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 <[email protected]> Signed-off-by: NipaLocal <nipa@local>
1 parent 1b8f717 commit 7b7de8a

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
@@ -361,6 +361,11 @@ static void sfp_fixup_ignore_tx_fault(struct sfp *sfp)
361361
sfp->state_ignore_mask |= SFP_F_TX_FAULT;
362362
}
363363

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

415432
static void sfp_fixup_rollball_cc(struct sfp *sfp)
@@ -512,6 +529,8 @@ static const struct sfp_quirk sfp_quirks[] = {
512529
SFP_QUIRK_F("Walsun", "HXSX-ATRC-1", sfp_fixup_fs_10gt),
513530
SFP_QUIRK_F("Walsun", "HXSX-ATRI-1", sfp_fixup_fs_10gt),
514531

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

0 commit comments

Comments
 (0)