Skip to content

Commit f75f8de

Browse files
authored
Merge pull request #1768 from jstamel/main
fpga: add subsystem vendor & device fields to PCIDevice
2 parents ca9c87d + c7d41a9 commit f75f8de

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

pkg/fpga/pci_linux.go

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ type PCIDevice struct {
4343
BDF string
4444
Vendor string
4545
Device string
46+
SubVendor string
47+
SubDevice string
4648
Class string
4749
CPUs string
4850
NUMA string
@@ -78,13 +80,15 @@ func NewPCIDevice(devPath string) (*PCIDevice, error) {
7880
}
7981

8082
fileMap := map[string]*string{
81-
"vendor": &pci.Vendor,
82-
"device": &pci.Device,
83-
"class": &pci.Class,
84-
"local_cpulist": &pci.CPUs,
85-
"numa_node": &pci.NUMA,
86-
"sriov_numvfs": &pci.VFs,
87-
"sriov_totalvfs": &pci.TotalVFs,
83+
"vendor": &pci.Vendor,
84+
"device": &pci.Device,
85+
"subsystem_vendor": &pci.SubVendor,
86+
"subsystem_device": &pci.SubDevice,
87+
"class": &pci.Class,
88+
"local_cpulist": &pci.CPUs,
89+
"numa_node": &pci.NUMA,
90+
"sriov_numvfs": &pci.VFs,
91+
"sriov_totalvfs": &pci.TotalVFs,
8892
}
8993

9094
if err = readFilesInDirectory(fileMap, pci.SysFsPath); err != nil {

0 commit comments

Comments
 (0)