net: amd-xgbe: Check only the minimum speed for active/passive cables
authorTom Lendacky <thomas.lendacky@amd.com>
Thu, 8 Dec 2022 16:22:25 +0000 (10:22 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:14:20 +0000 (13:14 +0100)
commit641eef876657943e58a61594cfe419db2868fc27
treec0afec07e598bb80cbbd8a8ab7ec14b857f6400f
parent60b35e28dc2a8b3f74a2da987ae78c6ef6433149
net: amd-xgbe: Check only the minimum speed for active/passive cables

[ Upstream commit f8ab263d4d48e6dab752029bf562f20a2ee630ed ]

There are cables that exist that can support speeds in excess of 10GbE.
The driver, however, restricts the EEPROM advertised nominal bitrate to
a specific range, which can prevent usage of cables that can support,
for example, up to 25GbE.

Rather than checking that an active or passive cable supports a specific
range, only check for a minimum supported speed.

Fixes: abf0a1c2b26a ("amd-xgbe: Add support for SFP+ modules")
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c