Skip to content

Commit 854b401

Browse files
elkabloopsiff
authored andcommitted
net: sfp: Fix Ubiquiti U-Fiber Instant SFP module on mvneta
[ Upstream commit eeee5a710f26ce57807024ef330fe5a850eaecd8 ] In commit 8110633 ("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 c762b7f ("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: 8110633 ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 6b63a54a790a68de0bd8f6889579be1018c2a86b) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent ba3d633 commit 854b401

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

drivers/net/phy/sfp.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,10 +465,15 @@ static void sfp_quirk_ubnt_uf_instant(const struct sfp_eeprom_id *id,
465465
{
466466
/* Ubiquiti U-Fiber Instant module claims that support all transceiver
467467
* types including 10G Ethernet which is not truth. So clear all claimed
468-
* modes and set only one mode which module supports: 1000baseX_Full.
468+
* modes and set only one mode which module supports: 1000baseX_Full,
469+
* along with the Autoneg and pause bits.
469470
*/
470471
linkmode_zero(modes);
471472
linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseX_Full_BIT, modes);
473+
linkmode_set_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, modes);
474+
linkmode_set_bit(ETHTOOL_LINK_MODE_Pause_BIT, modes);
475+
linkmode_set_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, modes);
476+
472477
phy_interface_zero(interfaces);
473478
__set_bit(PHY_INTERFACE_MODE_1000BASEX, interfaces);
474479
}

0 commit comments

Comments
 (0)