[PATCH 14/46] common/sfc_efx/base: update X4 BAR layout and PCI IDs

Ivan Malov ivan.malov at arknetworks.am
Wed Apr 16 15:59:44 CEST 2025


From: Andy Moreton <andy.moreton at amd.com>

The BAR layout on X4 has changed to put MSI-X (and CXL) in BAR0/1,
and moved the main memory BAR to be BAR2/3. Update definitions to
match the updated hardware and cmodel.

Also add PCI IDs used for functions which only have the full feature
(X2 style) datapath engines, and do not support the low latency
datapath engine.

Signed-off-by: Andy Moreton <andy.moreton at amd.com>
Reviewed-by: Ivan Malov <ivan.malov at arknetworks.am>
---
 drivers/common/sfc_efx/base/efx.h     | 12 +++++++++---
 drivers/common/sfc_efx/base/efx_nic.c |  2 ++
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h
index 442dfa0830..a9ed3f423f 100644
--- a/drivers/common/sfc_efx/base/efx.h
+++ b/drivers/common/sfc_efx/base/efx.h
@@ -173,9 +173,15 @@ efx_family_probe_bar(
 #define	EFX_PCI_DEVID_RIVERHEAD			0x0100
 #define	EFX_PCI_DEVID_RIVERHEAD_VF		0x1100
 
+/*
+ * Medford4 has low latency (LL) and full feature (FF) datapath engines.
+ * Some Medford4 functions have FF and LL datapath, others only have FF.
+ */
 #define	EFX_PCI_DEVID_MEDFORD4_PF_UNINIT	0x0C13
-#define	EFX_PCI_DEVID_MEDFORD4			0x0C03
-#define	EFX_PCI_DEVID_MEDFORD4_VF		0x1C03
+#define	EFX_PCI_DEVID_MEDFORD4			0x0C03	/* X4 PF, FF+LL */
+#define	EFX_PCI_DEVID_MEDFORD4_VF		0x1C03	/* X4 VF, FF+LL */
+#define	EFX_PCI_DEVID_MEDFORD4_NO_LL		0x2C03	/* X4 PF, FF only */
+#define	EFX_PCI_DEVID_MEDFORD4_NO_LL_VF		0x3C03	/* X4 VF, FF only */
 
 #define	EFX_MEM_BAR_SIENA			2
 
@@ -190,7 +196,7 @@ efx_family_probe_bar(
 /* FIXME Fix it when memory bar is fixed in FPGA image. It must be 0. */
 #define	EFX_MEM_BAR_RIVERHEAD			2
 
-#define	EFX_MEM_BAR_MEDFORD4			0
+#define	EFX_MEM_BAR_MEDFORD4			2
 
 /* Error codes */
 
diff --git a/drivers/common/sfc_efx/base/efx_nic.c b/drivers/common/sfc_efx/base/efx_nic.c
index 5bcc0a04ff..1ec684da40 100644
--- a/drivers/common/sfc_efx/base/efx_nic.c
+++ b/drivers/common/sfc_efx/base/efx_nic.c
@@ -87,6 +87,8 @@ efx_family(
 			 */
 		case EFX_PCI_DEVID_MEDFORD4:
 		case EFX_PCI_DEVID_MEDFORD4_VF:
+		case EFX_PCI_DEVID_MEDFORD4_NO_LL:
+		case EFX_PCI_DEVID_MEDFORD4_NO_LL_VF:
 			*efp = EFX_FAMILY_MEDFORD4;
 			*membarp = EFX_MEM_BAR_MEDFORD4;
 			return (0);
-- 
2.39.5



More information about the dev mailing list