37657612d7b953656a5b6cd64bbd390cb8e5288b
[openwrt/staging/xback.git] /
1 From 05ec5c085eb7ae044d49e04a3cff194a0b2a3251 Mon Sep 17 00:00:00 2001
2 From: Martin Schiller <ms@dev.tdt.de>
3 Date: Thu, 27 Feb 2025 08:10:58 +0100
4 Subject: net: sfp: add quirk for FS SFP-10GM-T copper SFP+ module
5
6 Add quirk for a copper SFP that identifies itself as "FS" "SFP-10GM-T".
7 It uses RollBall protocol to talk to the PHY and needs 4 sec wait before
8 probing the PHY.
9
10 Signed-off-by: Martin Schiller <ms@dev.tdt.de>
11 Link: https://patch.msgid.link/20250227071058.1520027-1-ms@dev.tdt.de
12 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
13 ---
14 drivers/net/phy/sfp.c | 11 ++++++-----
15 1 file changed, 6 insertions(+), 5 deletions(-)
16
17 --- a/drivers/net/phy/sfp.c
18 +++ b/drivers/net/phy/sfp.c
19 @@ -370,7 +370,7 @@ static void sfp_fixup_rollball(struct sf
20 sfp->phy_t_retry = msecs_to_jiffies(1000);
21 }
22
23 -static void sfp_fixup_fs_2_5gt(struct sfp *sfp)
24 +static void sfp_fixup_rollball_wait4s(struct sfp *sfp)
25 {
26 sfp_fixup_rollball(sfp);
27
28 @@ -384,7 +384,7 @@ static void sfp_fixup_fs_2_5gt(struct sf
29 static void sfp_fixup_fs_10gt(struct sfp *sfp)
30 {
31 sfp_fixup_10gbaset_30m(sfp);
32 - sfp_fixup_fs_2_5gt(sfp);
33 + sfp_fixup_rollball_wait4s(sfp);
34 }
35
36 static void sfp_fixup_halny_gsfp(struct sfp *sfp)
37 @@ -464,9 +464,10 @@ static const struct sfp_quirk sfp_quirks
38 // PHY.
39 SFP_QUIRK_F("FS", "SFP-10G-T", sfp_fixup_fs_10gt),
40
41 - // Fiberstore SFP-2.5G-T uses Rollball protocol to talk to the PHY and
42 - // needs 4 sec wait before probing the PHY.
43 - SFP_QUIRK_F("FS", "SFP-2.5G-T", sfp_fixup_fs_2_5gt),
44 + // Fiberstore SFP-2.5G-T and SFP-10GM-T uses Rollball protocol to talk
45 + // to the PHY and needs 4 sec wait before probing the PHY.
46 + SFP_QUIRK_F("FS", "SFP-2.5G-T", sfp_fixup_rollball_wait4s),
47 + SFP_QUIRK_F("FS", "SFP-10GM-T", sfp_fixup_rollball_wait4s),
48
49 // Fiberstore GPON-ONU-34-20BI can operate at 2500base-X, but report 1.2GBd
50 // NRZ in their EEPROM