From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: davem@davemloft.net, Andrew Lunn <andrew@lunn.ch>,
Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Russell King <linux@armlinux.org.uk>,
Jonas Jelonek <jelonek.jonas@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>
Cc: "Maxime Chevallier" <maxime.chevallier@bootlin.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
thomas.petazzoni@bootlin.com, "Simon Horman" <horms@kernel.org>,
"Romain Gantois" <romain.gantois@bootlin.com>,
"Marek Behún" <kabel@kernel.org>,
bcm-kernel-feedback-list@broadcom.com
Subject: [PATCH net-next 6/6] net: sfp: Add support for some BCM5461-based SGMII to 100FX modules
Date: Wed, 14 Jan 2026 23:57:28 +0100 [thread overview]
Message-ID: <20260114225731.811993-7-maxime.chevallier@bootlin.com> (raw)
In-Reply-To: <20260114225731.811993-1-maxime.chevallier@bootlin.com>
The Prolabs GLC-GE-100FX-C SFP module is a 100BaseFX module that plugs
into a Cisco SGMII capable cage, thus allowing to use 100M fiber on ports
that would usually only support SGMII and 1000BaseX.
This module contains a Broadcom BCM5461 PHY, but fails to properly indicate
support for e.100_fx mode.
The FS SFP-GE-100FX-C is a similar module, but this one does have the
e.100_fx bit set.
Add a quirk and fixup for these modules, to have a consistent linkmode
set, and make sure we use SGMII as the PHY interface.
The Prolabs module absolutely needs single-byte mdio accesses, otherwise
it freezes the i2c bus.
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
drivers/net/phy/sfp.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c
index bff91735f681..fb12616a67c1 100644
--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
@@ -481,6 +481,23 @@ static void sfp_quirk_ubnt_uf_instant(const struct sfp_eeprom_id *id,
caps->link_modes);
}
+static void sfp_fixup_sgmii_100fx(struct sfp *sfp)
+{
+ sfp->mdio_protocol = MDIO_I2C_SINGLE_BYTE_C22;
+ sfp->module_t_wait = msecs_to_jiffies(500);
+}
+
+static void sfp_quirk_sgmii_100fx(const struct sfp_eeprom_id *id,
+ struct sfp_module_caps *caps)
+{
+ /* Prolabs GLC-GE-100FX-C SGMII to 100FX module doesn't set the
+ * base.e100_base_fx bit.
+ */
+ linkmode_set_bit(ETHTOOL_LINK_MODE_100baseFX_Full_BIT,
+ caps->link_modes);
+ __set_bit(PHY_INTERFACE_MODE_SGMII, caps->interfaces);
+}
+
#define SFP_QUIRK(_v, _p, _s, _f) \
{ .vendor = _v, .part = _p, .support = _s, .fixup = _f, }
#define SFP_QUIRK_S(_v, _p, _s) SFP_QUIRK(_v, _p, _s, NULL)
@@ -553,6 +570,11 @@ static const struct sfp_quirk sfp_quirks[] = {
SFP_QUIRK_F("Turris", "RTSFP-2.5G", sfp_fixup_rollball),
SFP_QUIRK_F("Turris", "RTSFP-10", sfp_fixup_rollball),
SFP_QUIRK_F("Turris", "RTSFP-10G", sfp_fixup_rollball),
+
+ SFP_QUIRK("CISCO-PROLABS", "GLC-GE-100FX-C",
+ sfp_quirk_sgmii_100fx, sfp_fixup_sgmii_100fx),
+ SFP_QUIRK("FS", "SFP-GE-100FX",
+ sfp_quirk_sgmii_100fx, sfp_fixup_sgmii_100fx),
};
static size_t sfp_strlen(const char *str, size_t maxlen)
--
2.49.0
prev parent reply other threads:[~2026-01-14 22:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-14 22:57 [PATCH net-next 0/6] net: sfp: Add support for SGMII to 100FX modules Maxime Chevallier
2026-01-14 22:57 ` [PATCH net-next 1/6] " Maxime Chevallier
2026-01-14 22:57 ` [PATCH net-next 2/6] net: phylink: Allow more interfaces in SFP interface selection Maxime Chevallier
2026-01-14 23:30 ` Russell King (Oracle)
2026-01-15 7:49 ` Maxime Chevallier
2026-02-13 8:41 ` Maxime Chevallier
2026-03-05 15:05 ` Russell King (Oracle)
2026-03-05 16:35 ` Maxime Chevallier
2026-03-05 16:44 ` Russell King (Oracle)
2026-03-06 7:18 ` Maxime Chevallier
2026-01-14 22:57 ` [PATCH net-next 3/6] net: phy: Store module caps for PHYs embedded in SFP Maxime Chevallier
2026-01-14 22:57 ` [PATCH net-next 4/6] net: phy: broadcom: Support SGMII to 100FX on BCM5461 Maxime Chevallier
2026-01-14 22:57 ` [PATCH net-next 5/6] net: mdio: mdio-i2c: Add single-byte C22 MDIO protocol Maxime Chevallier
2026-01-14 22:57 ` Maxime Chevallier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260114225731.811993-7-maxime.chevallier@bootlin.com \
--to=maxime.chevallier@bootlin.com \
--cc=andrew@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=jelonek.jonas@gmail.com \
--cc=kabel@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=romain.gantois@bootlin.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox