Skip to content

Commit

Permalink
pci: Fix PCI_DEVICE_ID()
Browse files Browse the repository at this point in the history
The vendor ID is 16 bits not 8. This error leaves the top of the vendor
ID in the bottom bits of the device ID, which resulted in e.g. a failure
to run the PCI quirk for the AST VGA device.

Fixes: 2b841bf ("core/pci: Use cached vendor/device IDs in quirks")
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
amboar authored and stewartsmith committed Jun 19, 2018
1 parent 1b86a92 commit 50dfd06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ struct pci_device {
uint32_t vdid;
uint32_t sub_vdid;
#define PCI_VENDOR_ID(x) ((x) & 0xFFFF)
#define PCI_DEVICE_ID(x) ((x) >> 8)
#define PCI_DEVICE_ID(x) ((x) >> 16)
uint32_t class;
uint64_t cap_list;
struct {
Expand Down

0 comments on commit 50dfd06

Please sign in to comment.