summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-08-20 14:54:23 +1000
committerBen Skeggs <bskeggs@redhat.com>2015-08-28 12:37:44 +1000
commit8277f203aed51c802e1d580cb31c423e3b644265 (patch)
treeb9fbbdc113270c1d82dca38b9e0715b82cc45492 /lib
parenteeeb40c6398c7a9d2b194038193d98e3d6068a2f (diff)
downloadnouveau-8277f203aed51c802e1d580cb31c423e3b644265.tar.gz
device: import pciid list and integrate quirks with it
PCI IDs taken from the NVIDIA binary driver, with permission. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/include/nvif/os.h1
-rw-r--r--lib/main.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/include/nvif/os.h b/lib/include/nvif/os.h
index f718aef70..ce7dfb999 100644
--- a/lib/include/nvif/os.h
+++ b/lib/include/nvif/os.h
@@ -840,6 +840,7 @@ struct pci_bus {
struct pci_dev {
struct pci_device *pdev;
struct device dev;
+ u16 vendor;
u16 device;
u16 subsystem_vendor;
u16 subsystem_device;
diff --git a/lib/main.c b/lib/main.c
index 4103b0831..b71ee6fd7 100644
--- a/lib/main.c
+++ b/lib/main.c
@@ -161,7 +161,8 @@ os_init_device(struct pci_device *pdev, const char *cfg, const char *dbg)
"%04x:%02x:%02x.%1x",
pdev->domain, pdev->bus, pdev->dev, pdev->func);
odev->pdev.pdev = pdev;
- odev->pdev.device = pdev->vendor_id;
+ odev->pdev.vendor = pdev->vendor_id;
+ odev->pdev.device = pdev->device_id;
odev->pdev.subsystem_vendor = pdev->subvendor_id;
odev->pdev.subsystem_device = pdev->subdevice_id;
odev->pdev._bus.domain = pdev->domain;