[PATCH net-next] net: sfp: add quirk for XikeStor SKT-2.5G-100M

From: Jan Hoffmann

Date: Sun Sep 20 2026 - 15:48:22 EST


This 2.5G copper SFP module contains a RTL8221B-VB-CG PHY which can be
accessed using Rollball protocol.

Add a SFP quirk to enable Rollball protocol. It includes a small delay
to avoid unnecessary attempts at reading PHY registers before the
module is ready.

Note: The RTL8221B PHY in this module becomes stuck in a broken state
after attempting to read some registers on MMD 30 while it has already
established a link (this is a general issue with this PHY which happens
when it is configured for rate adaptation mode). This includes the
registers 2/3/8 which are read by "get_phy_c45_ids" during PHY probing.
However, the PHY takes about 4 seconds to establish a link after reset,
so in practice any host that supports TX_DISABLE should be unaffected,
as that puts the PHY into reset.

Signed-off-by: Jan Hoffmann <jan@xxxxxx>
---
drivers/net/phy/sfp.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)

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),
};

--
2.55.0