Skip to contentSkip to conversation

fpga: dfl-pci: add PCI subdevice ID for Intel D5005 card

PATCH In review Peter Colberg 2 participants 4 messages Apr 22, 2024 – Apr 30, 2024

Subsystems (2)
lore
Share & tools
lore

Peter Colberg

author Applied
#0 lore raw

PATCH 1/1 fpga: dfl-pci: add PCI subdevice ID for Intel D5005 card

Add PCI subdevice ID for the Intel D5005 Stratix 10 FPGA card as used with the Open FPGA Stack (OFS) FPGA Interface Manager (FIM).

Unlike the Intel D5005 PAC FIM which exposed a separate PCI device ID, the OFS FIM reuses the same device ID for all DFL-based FPGA cards and differentiates on the subdevice ID. The subdevice ID values were chosen as the numeric part of the FPGA card names in hexadecimal.

---
This patch was applied to Linux v6.9-rc5 and tested on an Intel D5005 card flashed with the latest released OFS 2024.1-1 D5005 FIM.

# fpgainfo fme D8:00.0
Intel FPGA Programmable Acceleration Card D5005
Board Management Controller, MAX10 NIOS FW version: 2.0.12 
Board Management Controller, MAX10 Build version: 2.0.8 
//****** FME ******//
Interface                        : DFL
Object Id                        : 0xED00002
PCIe s:b:d.f                     : 0000:D8:00.0
Vendor Id                        : 0x8086
Device Id                        : 0xBCCE
SubVendor Id                     : 0x8086
SubDevice Id                     : 0x138D
Socket Id                        : 0x00
Ports Num                        : 01
Bitstream Id                     : 0x4010002183C88A9
Bitstream Version                : 4.0.1
Pr Interface Id                  : a195b6f7-cf23-5a2b-8ef9-1161e184ec4e
Boot Page                        : user

---
The missing subdevice ID 0x138d was noticed while testing the patch series "fpga: dfl: fix kernel warning on port release/assign for SRIOV" applied to v6.9-rc4 on an Intel D5005 card. The absence of the subdevice ID was shadowed by an internal patch in the downstream Linux DFL kernel ("fpga: dfl: Add wildcard sub-device ID for intel DFL devs").

---
 drivers/fpga/dfl-pci.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/fpga/dfl-pci.c +3 -0
index 98b8fd16183e..80cac3a5f976 100644
@@ -78,6 +78,7 @@ static void cci_pci_free_irq(struct pci_dev *pcidev)
 #define PCIE_DEVICE_ID_SILICOM_PAC_N5011	0x1001
 #define PCIE_DEVICE_ID_INTEL_DFL		0xbcce
 /* PCI Subdevice ID for PCIE_DEVICE_ID_INTEL_DFL */
+#define PCIE_SUBDEVICE_ID_INTEL_D5005		0x138d
 #define PCIE_SUBDEVICE_ID_INTEL_N6000		0x1770
 #define PCIE_SUBDEVICE_ID_INTEL_N6001		0x1771
 #define PCIE_SUBDEVICE_ID_INTEL_C6100		0x17d4
@@ -101,6 +102,8 @@ static struct pci_device_id cci_pcie_id_tbl[] = {
 	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCIE_DEVICE_ID_INTEL_PAC_D5005_VF),},
 	{PCI_DEVICE(PCI_VENDOR_ID_SILICOM_DENMARK, PCIE_DEVICE_ID_SILICOM_PAC_N5010),},
 	{PCI_DEVICE(PCI_VENDOR_ID_SILICOM_DENMARK, PCIE_DEVICE_ID_SILICOM_PAC_N5011),},
+	{PCI_DEVICE_SUB(PCI_VENDOR_ID_INTEL, PCIE_DEVICE_ID_INTEL_DFL,
+			PCI_VENDOR_ID_INTEL, PCIE_SUBDEVICE_ID_INTEL_D5005),},
 	{PCI_DEVICE_SUB(PCI_VENDOR_ID_INTEL, PCIE_DEVICE_ID_INTEL_DFL,
 			PCI_VENDOR_ID_INTEL, PCIE_SUBDEVICE_ID_INTEL_N6000),},
 	{PCI_DEVICE_SUB(PCI_VENDOR_ID_INTEL, PCIE_DEVICE_ID_INTEL_DFL_VF,
Signature · 1 line
2.44.0
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Peter Colberg

Add PCI subdevice ID for the Intel D5005 Stratix 10 FPGA card as used with the Open FPGA Stack (OFS) FPGA Interface Manager (FIM).

Unlike the Intel D5005 PAC FIM which exposed a separate PCI device ID, the OFS FIM reuses the same device ID for all DFL-based FPGA cards and differentiates on the subdevice ID. The subdevice ID values were chosen as the numeric part of the FPGA card names in hexadecimal.

Any reason to put the Link in changelog. I didn't see it provide any extra info.

Quoted 2 lines

Besides,

Quoted 61 lines

---
This patch was applied to Linux v6.9-rc5 and tested on an Intel D5005 card flashed with the latest released OFS 2024.1-1 D5005 FIM.

# fpgainfo fme D8:00.0
Intel FPGA Programmable Acceleration Card D5005
Board Management Controller, MAX10 NIOS FW version: 2.0.12 
Board Management Controller, MAX10 Build version: 2.0.8 
//****** FME ******//
Interface                        : DFL
Object Id                        : 0xED00002
PCIe s:b:d.f                     : 0000:D8:00.0
Vendor Id                        : 0x8086
Device Id                        : 0xBCCE
SubVendor Id                     : 0x8086
SubDevice Id                     : 0x138D
Socket Id                        : 0x00
Ports Num                        : 01
Bitstream Id                     : 0x4010002183C88A9
Bitstream Version                : 4.0.1
Pr Interface Id                  : a195b6f7-cf23-5a2b-8ef9-1161e184ec4e
Boot Page                        : user

---
The missing subdevice ID 0x138d was noticed while testing the patch series "fpga: dfl: fix kernel warning on port release/assign for SRIOV" applied to v6.9-rc4 on an Intel D5005 card. The absence of the subdevice ID was shadowed by an internal patch in the downstream Linux DFL kernel ("fpga: dfl: Add wildcard sub-device ID for intel DFL devs").

---
 drivers/fpga/dfl-pci.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/fpga/dfl-pci.c +3 -0
index 98b8fd16183e..80cac3a5f976 100644
@@ -78,6 +78,7 @@ static void cci_pci_free_irq(struct pci_dev *pcidev)
 #define PCIE_DEVICE_ID_SILICOM_PAC_N5011	0x1001
 #define PCIE_DEVICE_ID_INTEL_DFL		0xbcce
 /* PCI Subdevice ID for PCIE_DEVICE_ID_INTEL_DFL */
+#define PCIE_SUBDEVICE_ID_INTEL_D5005		0x138d
 #define PCIE_SUBDEVICE_ID_INTEL_N6000		0x1770
 #define PCIE_SUBDEVICE_ID_INTEL_N6001		0x1771
 #define PCIE_SUBDEVICE_ID_INTEL_C6100		0x17d4
@@ -101,6 +102,8 @@ static struct pci_device_id cci_pcie_id_tbl[] = {
 	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCIE_DEVICE_ID_INTEL_PAC_D5005_VF),},
 	{PCI_DEVICE(PCI_VENDOR_ID_SILICOM_DENMARK, PCIE_DEVICE_ID_SILICOM_PAC_N5010),},
 	{PCI_DEVICE(PCI_VENDOR_ID_SILICOM_DENMARK, PCIE_DEVICE_ID_SILICOM_PAC_N5011),},
+	{PCI_DEVICE_SUB(PCI_VENDOR_ID_INTEL, PCIE_DEVICE_ID_INTEL_DFL,
+			PCI_VENDOR_ID_INTEL, PCIE_SUBDEVICE_ID_INTEL_D5005),},
 	{PCI_DEVICE_SUB(PCI_VENDOR_ID_INTEL, PCIE_DEVICE_ID_INTEL_DFL,
 			PCI_VENDOR_ID_INTEL, PCIE_SUBDEVICE_ID_INTEL_N6000),},
 	{PCI_DEVICE_SUB(PCI_VENDOR_ID_INTEL, PCIE_DEVICE_ID_INTEL_DFL_VF,
Signature · 1 line
2.44.0
#2 lore raw
Quoted 9 lines · Xu Yilun
Quoted 8 lines · Peter Colberg

Add PCI subdevice ID for the Intel D5005 Stratix 10 FPGA card as used with the Open FPGA Stack (OFS) FPGA Interface Manager (FIM).

Unlike the Intel D5005 PAC FIM which exposed a separate PCI device ID, the OFS FIM reuses the same device ID for all DFL-based FPGA cards and differentiates on the subdevice ID. The subdevice ID values were chosen as the numeric part of the FPGA card names in hexadecimal.

Quoted 4 lines
Quoted 1 line

Any reason to put the Link in changelog. I didn't see it provide any extra info.

The link is provided to point to the corresponding change in the dfl- pci-ids registry, for someone who might not be aware of its existence.

Quoted 7 lines
Quoted 3 lines

Besides,

Thank you for the review.

Peter

Quoted 62 lines
Quoted 62 lines

---
This patch was applied to Linux v6.9-rc5 and tested on an Intel D5005 card flashed with the latest released OFS 2024.1-1 D5005 FIM.

# fpgainfo fme D8:00.0
Intel FPGA Programmable Acceleration Card D5005
Board Management Controller, MAX10 NIOS FW version: 2.0.12 
Board Management Controller, MAX10 Build version: 2.0.8 
//****** FME ******//
Interface                        : DFL
Object Id                        : 0xED00002
PCIe s:b:d.f                     : 0000:D8:00.0
Vendor Id                        : 0x8086
Device Id                        : 0xBCCE
SubVendor Id                     : 0x8086
SubDevice Id                     : 0x138D
Socket Id                        : 0x00
Ports Num                        : 01
Bitstream Id                     : 0x4010002183C88A9
Bitstream Version                : 4.0.1
Pr Interface Id                  : a195b6f7-cf23-5a2b-8ef9-1161e184ec4e
Boot Page                        : user

---
The missing subdevice ID 0x138d was noticed while testing the patch series "fpga: dfl: fix kernel warning on port release/assign for SRIOV" applied to v6.9-rc4 on an Intel D5005 card. The absence of the subdevice ID was shadowed by an internal patch in the downstream Linux DFL kernel ("fpga: dfl: Add wildcard sub-device ID for intel DFL devs").

---
 drivers/fpga/dfl-pci.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/fpga/dfl-pci.c +3 -0
index 98b8fd16183e..80cac3a5f976 100644
@@ -78,6 +78,7 @@ static void cci_pci_free_irq(struct pci_dev *pcidev)
 #define PCIE_DEVICE_ID_SILICOM_PAC_N5011	0x1001
 #define PCIE_DEVICE_ID_INTEL_DFL		0xbcce
 /* PCI Subdevice ID for PCIE_DEVICE_ID_INTEL_DFL */
+#define PCIE_SUBDEVICE_ID_INTEL_D5005		0x138d
 #define PCIE_SUBDEVICE_ID_INTEL_N6000		0x1770
 #define PCIE_SUBDEVICE_ID_INTEL_N6001		0x1771
 #define PCIE_SUBDEVICE_ID_INTEL_C6100		0x17d4
@@ -101,6 +102,8 @@ static struct pci_device_id cci_pcie_id_tbl[] = {
 	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCIE_DEVICE_ID_INTEL_PAC_D5005_VF),},
 	{PCI_DEVICE(PCI_VENDOR_ID_SILICOM_DENMARK, PCIE_DEVICE_ID_SILICOM_PAC_N5010),},
 	{PCI_DEVICE(PCI_VENDOR_ID_SILICOM_DENMARK, PCIE_DEVICE_ID_SILICOM_PAC_N5011),},
+	{PCI_DEVICE_SUB(PCI_VENDOR_ID_INTEL, PCIE_DEVICE_ID_INTEL_DFL,
+			PCI_VENDOR_ID_INTEL, PCIE_SUBDEVICE_ID_INTEL_D5005),},
 	{PCI_DEVICE_SUB(PCI_VENDOR_ID_INTEL, PCIE_DEVICE_ID_INTEL_DFL,
 			PCI_VENDOR_ID_INTEL, PCIE_SUBDEVICE_ID_INTEL_N6000),},
 	{PCI_DEVICE_SUB(PCI_VENDOR_ID_INTEL, PCIE_DEVICE_ID_INTEL_DFL_VF,
Signature · 1 line
2.44.0
#3 lore raw
Quoted 10 lines · Peter
Quoted 9 lines · Xu Yilun
Quoted 8 lines · Peter Colberg

Add PCI subdevice ID for the Intel D5005 Stratix 10 FPGA card as used with the Open FPGA Stack (OFS) FPGA Interface Manager (FIM).

Unlike the Intel D5005 PAC FIM which exposed a separate PCI device ID, the OFS FIM reuses the same device ID for all DFL-based FPGA cards and differentiates on the subdevice ID. The subdevice ID values were chosen as the numeric part of the FPGA card names in hexadecimal.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Any reason to put the Link in changelog. I didn't see it provide any extra info.

The link is provided to point to the corresponding change in the dfl- pci-ids registry, for someone who might not be aware of its existence.

I suggest you don't put it in changelog, few people care about this downstream history. Put it below '---' if really necessary. I deleted this link when apply.

Thanks,
Yilun