netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 1/1] amd-xgbe: fix active cable determination
@ 2022-11-10 21:03 Thomas Kupper
  2022-11-10 21:57 ` Jakub Kicinski
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Kupper @ 2022-11-10 21:03 UTC (permalink / raw)
  To: netdev

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@gmail.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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-11  1:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-10 21:03 [PATCH net 1/1] amd-xgbe: fix active cable determination Thomas Kupper
2022-11-10 21:57 ` Jakub Kicinski
     [not found]   ` <fcf6ad3b-8dde-a926-1b6e-e2810040d7c8@gmail.com>
     [not found]     ` <20221110143558.793dd6bf@kernel.org>
2022-11-10 23:00       ` Thomas Kupper
2022-11-11  1:11         ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).