lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <8c3c6939-ec3d-012d-f686-ddcf5812c21b@gmail.com>
Date:   Thu, 10 Nov 2022 22:03:32 +0100
From:   Thomas Kupper <thomas.kupper@...il.com>
To:     netdev@...r.kernel.org
Subject: [PATCH net 1/1] amd-xgbe: fix active cable determination

When determine the type of SFP, active cables were not handled.

Add the check for active cables as an extension to the passive cable
check.

Signed-off-by: Thomas Kupper <thomas.kupper@...il.com>
---
  drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c 
b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
index 4064c3e3dd49..1ba550d5c52d 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
@@ -1158,8 +1158,9 @@ static void xgbe_phy_sfp_parse_eeprom(struct 
xgbe_prv_data *pdata)
      }

      /* Determine the type of SFP */
-    if (phy_data->sfp_cable == XGBE_SFP_CABLE_PASSIVE &&
-        xgbe_phy_sfp_bit_rate(sfp_eeprom, XGBE_SFP_SPEED_10000))
+    if ((phy_data->sfp_cable == XGBE_SFP_CABLE_PASSIVE ||
+         phy_data->sfp_cable == XGBE_SFP_CABLE_ACTIVE) &&
+         xgbe_phy_sfp_bit_rate(sfp_eeprom, XGBE_SFP_SPEED_10000))
          phy_data->sfp_base = XGBE_SFP_BASE_10000_CR;
      else if (sfp_base[XGBE_SFP_BASE_10GBE_CC] & XGBE_SFP_BASE_10GBE_CC_SR)
          phy_data->sfp_base = XGBE_SFP_BASE_10000_SR;

--
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ