Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: sfp: Fix Ubiquiti U-Fiber Instant SFP module on mvneta

In commit 8110633db49d7de2 ("net: sfp-bus: allow SFP quirks to override
Autoneg and pause bits") we moved the setting of Autoneg and pause bits
before the call to SFP quirk when parsing SFP module support.

Since the quirk for Ubiquiti U-Fiber Instant SFP module zeroes the
support bits and sets 1000baseX_Full only, the above mentioned commit
changed the overall computed support from
1000baseX_Full, Autoneg, Pause, Asym_Pause
to just
1000baseX_Full.

This broke the SFP module for mvneta, which requires Autoneg for
1000baseX since commit c762b7fac1b249a9 ("net: mvneta: deny disabling
autoneg for 802.3z modes").

Fix this by setting back the Autoneg, Pause and Asym_Pause bits in the
quirk.

Fixes: 8110633db49d7de2 ("net: sfp-bus: allow SFP quirks to override Autoneg and pause bits")
Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/20260326122038.2489589-1-kabel@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Marek Behún and committed by
Jakub Kicinski
eeee5a71 5d17af9e

+6 -1
+6 -1
drivers/net/phy/sfp.c
··· 480 480 { 481 481 /* Ubiquiti U-Fiber Instant module claims that support all transceiver 482 482 * types including 10G Ethernet which is not truth. So clear all claimed 483 - * modes and set only one mode which module supports: 1000baseX_Full. 483 + * modes and set only one mode which module supports: 1000baseX_Full, 484 + * along with the Autoneg and pause bits. 484 485 */ 485 486 linkmode_zero(caps->link_modes); 486 487 linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseX_Full_BIT, 487 488 caps->link_modes); 489 + linkmode_set_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, caps->link_modes); 490 + linkmode_set_bit(ETHTOOL_LINK_MODE_Pause_BIT, caps->link_modes); 491 + linkmode_set_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, caps->link_modes); 492 + 488 493 phy_interface_zero(caps->interfaces); 489 494 __set_bit(PHY_INTERFACE_MODE_1000BASEX, caps->interfaces); 490 495 }