aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/pci.c5
-rw-r--r--include/pci.h3
2 files changed, 8 insertions, 0 deletions
diff --git a/core/pci.c b/core/pci.c
index 92ff2cf..a8015cb 100644
--- a/core/pci.c
+++ b/core/pci.c
@@ -161,6 +161,11 @@ static struct pci_device *pci_scan_one(struct phb *phb, struct pci_device *paren
goto fail;
}
pd->bdfn = bdfn;
+ pd->vdid = vdid;
+ pci_cfg_read32(phb, bdfn, PCI_CFG_SUBSYS_VENDOR_ID, &pd->sub_vdid);
+ pci_cfg_read32(phb, bdfn, PCI_CFG_REV_ID, &pd->class);
+ pd->class >>= 8;
+
pd->parent = parent;
list_head_init(&pd->pcrf);
list_head_init(&pd->children);
diff --git a/include/pci.h b/include/pci.h
index f74c961..ca3f949 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -138,6 +138,9 @@ struct pci_device {
uint8_t subordinate_bus;
uint32_t scan_map;
+ uint32_t vdid;
+ uint32_t sub_vdid;
+ uint32_t class;
uint64_t cap_list;
uint32_t cap[64];
uint32_t mps; /* Max payload size capability */