diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c index 2ec91466acdf..6bbb02117217 100644 --- a/drivers/net/phy/sfp.c +++ b/drivers/net/phy/sfp.c @@ -432,6 +432,19 @@ static void sfp_fixup_rollball_wait4s(struct sfp *sfp) sfp->module_t_wait = msecs_to_jiffies(4000); } +static void sfp_fixup_xikestor_2_5g(struct sfp *sfp) +{ + sfp_fixup_rollball(sfp); + + /* This module does not immediately respond to Rollball commands. Add + * a small delay to avoid unnecessary PHY access attempts. Note that + * the delay should not be too long, as the RTL8221B-VB-CG PHY inside + * breaks when reading some registers from MMD 30 if it has already + * established a link (which takes about 4 seconds after reset). + */ + sfp->module_t_wait = msecs_to_jiffies(1000); +} + static void sfp_fixup_fs_10gt(struct sfp *sfp) { sfp_fixup_10gbaset_30m(sfp); @@ -636,6 +649,8 @@ static const struct sfp_quirk sfp_quirks[] = { SFP_QUIRK_F("Turris", "RTSFP-10", sfp_fixup_rollball), SFP_QUIRK_F("Turris", "RTSFP-10G", sfp_fixup_rollball), + SFP_QUIRK_F("XikeStor", "SKT-2.5G-100M", sfp_fixup_xikestor_2_5g), + SFP_QUIRK_S("ZOERAX", "SFP-2.5G-T", sfp_quirk_oem_2_5g), };