]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: amd-xgbe: Fix logic around active and passive cables
authorTom Lendacky <thomas.lendacky@amd.com>
Thu, 8 Dec 2022 16:22:24 +0000 (10:22 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:26:13 +0000 (13:26 +0100)
commit877e5c68fc91d8cfc84b7e6a6afdd73da246b84f
tree288fd5cd2025aca7a3397b44b67672c39889a52f
parentd8f80719a6a51c6db5dcdbc8672312b51de76a90
net: amd-xgbe: Fix logic around active and passive cables

[ Upstream commit 4998006c73afe44e2f639d55bd331c6c26eb039f ]

SFP+ active and passive cables are copper cables with fixed SFP+ end
connectors. Due to a misinterpretation of this, SFP+ active cables could
end up not being recognized, causing the driver to fail to establish a
connection.

Introduce a new enum in SFP+ cable types, XGBE_SFP_CABLE_FIBER, that is
the default cable type, and handle active and passive cables when they are
specifically detected.

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