Commit 7a77233e authored by Russell King's avatar Russell King Committed by David S. Miller

net: sfp: relax bitrate-derived mode check

Do not check the encoding when deriving 1000BASE-X from the bitrate
when no other modes are discovered. Some GPON modules (VSOL V2801F
and CarlitoxxPro CPGOS03-0490 v2.0) indicate NRZ encoding with a
1200Mbaud bitrate, but should be driven with 1000BASE-X on the host
side.
Tested-by: default avatarPali Rohár <pali@kernel.org>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0d035bed
...@@ -334,14 +334,13 @@ void sfp_parse_support(struct sfp_bus *bus, const struct sfp_eeprom_id *id, ...@@ -334,14 +334,13 @@ void sfp_parse_support(struct sfp_bus *bus, const struct sfp_eeprom_id *id,
} }
/* If we haven't discovered any modes that this module supports, try /* If we haven't discovered any modes that this module supports, try
* the encoding and bitrate to determine supported modes. Some BiDi * the bitrate to determine supported modes. Some BiDi modules (eg,
* modules (eg, 1310nm/1550nm) are not 1000BASE-BX compliant due to * 1310nm/1550nm) are not 1000BASE-BX compliant due to the differing
* the differing wavelengths, so do not set any transceiver bits. * wavelengths, so do not set any transceiver bits.
*/ */
if (bitmap_empty(modes, __ETHTOOL_LINK_MODE_MASK_NBITS)) { if (bitmap_empty(modes, __ETHTOOL_LINK_MODE_MASK_NBITS)) {
/* If the encoding and bit rate allows 1000baseX */ /* If the bit rate allows 1000baseX */
if (id->base.encoding == SFF8024_ENCODING_8B10B && br_nom && if (br_nom && br_min <= 1300 && br_max >= 1200)
br_min <= 1300 && br_max >= 1200)
phylink_set(modes, 1000baseX_Full); phylink_set(modes, 1000baseX_Full);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment