net: sfp: relax bitrate-derived mode check
authorRussell King <rmk+kernel@armlinux.org.uk>
Wed, 9 Dec 2020 11:22:54 +0000 (11:22 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Apr 2021 09:43:22 +0000 (11:43 +0200)
commit2a60ab2dab3df84e6d6690ac7a23e1d921b25a36
tree92bfd42ed3011c609eaf060d9ed5260187503d16
parentcd8ce27e6caaee47a6d4212e6d9b82e28969cf40
net: sfp: relax bitrate-derived mode check

commit 7a77233ec6d114322e2c4f71b4e26dbecd9ea8a7 upstream.

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/phy/sfp-bus.c