aboutsummaryrefslogtreecommitdiff
path: root/include/pci.h
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2017-04-07 10:16:17 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-06-15 17:10:11 +1000
commit2b841bf0ef1b20d9544ffe641d6271b65b9efcc4 (patch)
treeed8dd65aaefb81a64fa3c5b5276ce08e3640b0c3 /include/pci.h
parente835c2fb7ce1e9bff7ca5948c1343037e906395f (diff)
downloadskiboot-2b841bf0ef1b20d9544ffe641d6271b65b9efcc4.zip
skiboot-2b841bf0ef1b20d9544ffe641d6271b65b9efcc4.tar.gz
skiboot-2b841bf0ef1b20d9544ffe641d6271b65b9efcc4.tar.bz2
core/pci: Use cached vendor/device IDs in quirks
The PCI device vendor/device IDs have been cached to pd->vdid, no need to pass them in pci_handle_quirk(). This also introduces two macros to extract vendor/device fields and they are useful afterwards. No logical changes introduced. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include/pci.h')
-rw-r--r--include/pci.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/pci.h b/include/pci.h
index 0aea56c..f216594 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -73,6 +73,8 @@ struct pci_device {
uint32_t vdid;
uint32_t sub_vdid;
+#define PCI_VENDOR_ID(x) ((x) & 0xFFFF)
+#define PCI_DEVICE_ID(x) ((x) >> 8)
uint32_t class;
uint64_t cap_list;
struct {