]> www.infradead.org Git - users/dwmw2/linux.git/commit
amd-xgbe: fix the SFP compliance codes check for DAC cables
authorRaju Rangoju <Raju.Rangoju@amd.com>
Thu, 20 Oct 2022 06:42:14 +0000 (12:12 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Nov 2022 14:57:52 +0000 (23:57 +0900)
commit17350734fdca3de84c6a0da5012f341dfd2ff75f
treea84ad7be265552518900f1823df247dbfce48111
parentb55d6ea965ba1f4c16c238af49f35b26f6bfc3fe
amd-xgbe: fix the SFP compliance codes check for DAC cables

[ Upstream commit 09c5f6bf11ac98874339e55f4f5f79a9dbc9b375 ]

The current XGBE code assumes that offset 6 of EEPROM SFP DAC (passive)
cables is NULL. However, some cables (the 5 meter and 7 meter Molex
passive cables) have non-zero data at offset 6. Fix the logic by moving
the passive cable check above the active checks, so as not to be
improperly identified as an active cable. This will fix the issue for
any passive cable that advertises 1000Base-CX in offset 6.

Fixes: abf0a1c2b26a ("amd-xgbe: Add support for SFP+ modules")
Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c