* [PATCH net v2] net: sfp: Fix quirk for Ubiquiti U-Fiber Instant SFP module
@ 2026-01-29 8:22 Marek Behún
2026-01-29 8:45 ` Maxime Chevallier
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Marek Behún @ 2026-01-29 8:22 UTC (permalink / raw)
To: netdev, Russell King
Cc: Paolo Abeni, Jakub Kicinski, Eric Dumazet, David S. Miller,
Heiner Kallweit, Andrew Lunn, Maxime Chevallier, Marek Behún
Commit fd580c9830316eda ("net: sfp: augment SFP parsing with
phy_interface_t bitmap") did not add augumentation for the interface
bitmap in the quirk for Ubiquiti U-Fiber Instant.
The subsequent commit f81fa96d8a6c7a77 ("net: phylink: use
phy_interface_t bitmaps for optical modules") then changed phylink code
for selection of SFP interface: instead of using link mode bitmap, the
interface bitmap is used, and the fastest interface mode supported by
both SFP module and MAC is chosen.
Since the interface bitmap contains also modes faster than 1000base-x,
this caused a regression wherein this module stopped working
out-of-the-box.
Fix this.
Fixes: fd580c9830316eda ("net: sfp: augment SFP parsing with phy_interface_t bitmap")
Signed-off-by: Marek Behún <kabel@kernel.org>
---
Changes since v1:
- use phy_interface_zero() instead of bitmap_zero(), as per Maxime's suggestion
---
drivers/net/phy/sfp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c
index 47f095bd91ce..3e023723887c 100644
--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
@@ -479,6 +479,8 @@ static void sfp_quirk_ubnt_uf_instant(const struct sfp_eeprom_id *id,
linkmode_zero(caps->link_modes);
linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseX_Full_BIT,
caps->link_modes);
+ phy_interface_zero(caps->interfaces);
+ __set_bit(PHY_INTERFACE_MODE_1000BASEX, caps->interfaces);
}
#define SFP_QUIRK(_v, _p, _s, _f) \
--
2.52.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net v2] net: sfp: Fix quirk for Ubiquiti U-Fiber Instant SFP module
2026-01-29 8:22 [PATCH net v2] net: sfp: Fix quirk for Ubiquiti U-Fiber Instant SFP module Marek Behún
@ 2026-01-29 8:45 ` Maxime Chevallier
2026-01-29 11:19 ` Russell King (Oracle)
2026-01-31 1:40 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Maxime Chevallier @ 2026-01-29 8:45 UTC (permalink / raw)
To: Marek Behún, netdev, Russell King
Cc: Paolo Abeni, Jakub Kicinski, Eric Dumazet, David S. Miller,
Heiner Kallweit, Andrew Lunn
Hi Marek,
On 29/01/2026 09:22, Marek Behún wrote:
> Commit fd580c9830316eda ("net: sfp: augment SFP parsing with
> phy_interface_t bitmap") did not add augumentation for the interface
> bitmap in the quirk for Ubiquiti U-Fiber Instant.
>
> The subsequent commit f81fa96d8a6c7a77 ("net: phylink: use
> phy_interface_t bitmaps for optical modules") then changed phylink code
> for selection of SFP interface: instead of using link mode bitmap, the
> interface bitmap is used, and the fastest interface mode supported by
> both SFP module and MAC is chosen.
>
> Since the interface bitmap contains also modes faster than 1000base-x,
> this caused a regression wherein this module stopped working
> out-of-the-box.
>
> Fix this.
>
> Fixes: fd580c9830316eda ("net: sfp: augment SFP parsing with phy_interface_t bitmap")
> Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Maxime
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net v2] net: sfp: Fix quirk for Ubiquiti U-Fiber Instant SFP module
2026-01-29 8:22 [PATCH net v2] net: sfp: Fix quirk for Ubiquiti U-Fiber Instant SFP module Marek Behún
2026-01-29 8:45 ` Maxime Chevallier
@ 2026-01-29 11:19 ` Russell King (Oracle)
2026-01-31 1:40 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Russell King (Oracle) @ 2026-01-29 11:19 UTC (permalink / raw)
To: Marek Behún
Cc: netdev, Paolo Abeni, Jakub Kicinski, Eric Dumazet,
David S. Miller, Heiner Kallweit, Andrew Lunn, Maxime Chevallier
On Thu, Jan 29, 2026 at 09:22:27AM +0100, Marek Behún wrote:
> Commit fd580c9830316eda ("net: sfp: augment SFP parsing with
> phy_interface_t bitmap") did not add augumentation for the interface
> bitmap in the quirk for Ubiquiti U-Fiber Instant.
>
> The subsequent commit f81fa96d8a6c7a77 ("net: phylink: use
> phy_interface_t bitmaps for optical modules") then changed phylink code
> for selection of SFP interface: instead of using link mode bitmap, the
> interface bitmap is used, and the fastest interface mode supported by
> both SFP module and MAC is chosen.
>
> Since the interface bitmap contains also modes faster than 1000base-x,
> this caused a regression wherein this module stopped working
> out-of-the-box.
Thanks for finding that. Probably the result of having the patch
converting to use the PHY interface mode mask sitting around for a
very long time. Sorry about missing that.
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thanks!
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net v2] net: sfp: Fix quirk for Ubiquiti U-Fiber Instant SFP module
2026-01-29 8:22 [PATCH net v2] net: sfp: Fix quirk for Ubiquiti U-Fiber Instant SFP module Marek Behún
2026-01-29 8:45 ` Maxime Chevallier
2026-01-29 11:19 ` Russell King (Oracle)
@ 2026-01-31 1:40 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-01-31 1:40 UTC (permalink / raw)
To: =?utf-8?q?Marek_Beh=C3=BAn_=3Ckabel=40kernel=2Eorg=3E?=
Cc: netdev, linux, pabeni, kuba, edumazet, davem, hkallweit1, andrew,
maxime.chevallier
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 29 Jan 2026 09:22:27 +0100 you wrote:
> Commit fd580c9830316eda ("net: sfp: augment SFP parsing with
> phy_interface_t bitmap") did not add augumentation for the interface
> bitmap in the quirk for Ubiquiti U-Fiber Instant.
>
> The subsequent commit f81fa96d8a6c7a77 ("net: phylink: use
> phy_interface_t bitmaps for optical modules") then changed phylink code
> for selection of SFP interface: instead of using link mode bitmap, the
> interface bitmap is used, and the fastest interface mode supported by
> both SFP module and MAC is chosen.
>
> [...]
Here is the summary with links:
- [net,v2] net: sfp: Fix quirk for Ubiquiti U-Fiber Instant SFP module
https://git.kernel.org/netdev/net/c/adcbadfd8e05
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-01-31 1:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-29 8:22 [PATCH net v2] net: sfp: Fix quirk for Ubiquiti U-Fiber Instant SFP module Marek Behún
2026-01-29 8:45 ` Maxime Chevallier
2026-01-29 11:19 ` Russell King (Oracle)
2026-01-31 1:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox