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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: 
 <175028446893.625704.10103673858068429312.stgit@ahduyck-xeon-server.home.arpa>
Date: Wed, 18 Jun 2025 15:07:48 -0700
From: Alexander Duyck <alexander.duyck@...il.com>
To: netdev@...r.kernel.org
Cc: linux@...linux.org.uk, hkallweit1@...il.com, andrew+netdev@...n.ch,
 davem@...emloft.net, pabeni@...hat.com, kuba@...nel.org,
 kernel-team@...a.com, edumazet@...gle.com
Subject: [net-next PATCH v3 5/8] fbnic: Update FW link mode values to
 represent actual link modes

From: Alexander Duyck <alexanderduyck@...com>

Make it so that the enum we use for the FW values represents actual link
modes that will be normally advertised by a link partner.

Signed-off-by: Alexander Duyck <alexanderduyck@...com>
---
 drivers/net/ethernet/meta/fbnic/fbnic_fw.h  |    8 ++++----
 drivers/net/ethernet/meta/fbnic/fbnic_mac.c |    8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_fw.h b/drivers/net/ethernet/meta/fbnic/fbnic_fw.h
index 08bc4b918de7..08bf87c5ddf6 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_fw.h
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_fw.h
@@ -155,10 +155,10 @@ enum {
 };
 
 enum {
-	FBNIC_FW_LINK_SPEED_25R1		= 1,
-	FBNIC_FW_LINK_SPEED_50R2		= 2,
-	FBNIC_FW_LINK_SPEED_50R1		= 3,
-	FBNIC_FW_LINK_SPEED_100R2		= 4,
+	FBNIC_FW_LINK_MODE_25CR			= 1,
+	FBNIC_FW_LINK_MODE_50CR2		= 2,
+	FBNIC_FW_LINK_MODE_50CR			= 3,
+	FBNIC_FW_LINK_MODE_100CR2		= 4,
 };
 
 enum {
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_mac.c b/drivers/net/ethernet/meta/fbnic/fbnic_mac.c
index 0528724011c1..284fcfbedb74 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_mac.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_mac.c
@@ -544,17 +544,17 @@ static void fbnic_mac_get_fw_settings(struct fbnic_dev *fbd, u8 *aui, u8 *fec)
 {
 	/* Retrieve default speed from FW */
 	switch (fbd->fw_cap.link_speed) {
-	case FBNIC_FW_LINK_SPEED_25R1:
+	case FBNIC_FW_LINK_MODE_25CR:
 		*aui = FBNIC_AUI_25GAUI;
 		break;
-	case FBNIC_FW_LINK_SPEED_50R2:
+	case FBNIC_FW_LINK_MODE_50CR2:
 		*aui = FBNIC_AUI_LAUI2;
 		break;
-	case FBNIC_FW_LINK_SPEED_50R1:
+	case FBNIC_FW_LINK_MODE_50CR:
 		*aui = FBNIC_AUI_50GAUI1;
 		*fec = FBNIC_FEC_RS;
 		return;
-	case FBNIC_FW_LINK_SPEED_100R2:
+	case FBNIC_FW_LINK_MODE_100CR2:
 		*aui = FBNIC_AUI_100GAUI2;
 		*fec = FBNIC_FEC_RS;
 		return;



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ