summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorGabe Black2009-10-06 17:45:19 +0200
committerJesse Barnes2009-11-04 22:06:36 +0100
commitbc577d2bb98cc44371287fce3e892d26ad4050a8 (patch)
tree801ff1dbf10301bda75879141482eb226192e280 /drivers/pci
parentPCI: PCIe AER: honor ACPI HEST FIRMWARE FIRST mode (diff)
downloadkernel-qcow2-linux-bc577d2bb98cc44371287fce3e892d26ad4050a8.tar.gz
kernel-qcow2-linux-bc577d2bb98cc44371287fce3e892d26ad4050a8.tar.xz
kernel-qcow2-linux-bc577d2bb98cc44371287fce3e892d26ad4050a8.zip
PCI: populate subsystem vendor and device IDs for PCI bridges
Change to populate the subsystem vendor and subsytem device IDs for PCI-PCI bridges that implement the PCI Subsystem Vendor ID capability. Previously bridges left subsystem vendor IDs unpopulated. Signed-off-by: Gabe Black <gabe.black@ni.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/probe.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 118463befef0..4842b09b7f3c 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -730,6 +730,7 @@ int pci_setup_device(struct pci_dev *dev)
u32 class;
u8 hdr_type;
struct pci_slot *slot;
+ int pos = 0;
if (pci_read_config_byte(dev, PCI_HEADER_TYPE, &hdr_type))
return -EIO;
@@ -822,6 +823,11 @@ int pci_setup_device(struct pci_dev *dev)
dev->transparent = ((dev->class & 0xff) == 1);
pci_read_bases(dev, 2, PCI_ROM_ADDRESS1);
set_pcie_hotplug_bridge(dev);
+ pos = pci_find_capability(dev, PCI_CAP_ID_SSVID);
+ if (pos) {
+ pci_read_config_word(dev, pos + PCI_SSVID_VENDOR_ID, &dev->subsystem_vendor);
+ pci_read_config_word(dev, pos + PCI_SSVID_DEVICE_ID, &dev->subsystem_device);
+ }
break;
case PCI_HEADER_TYPE_CARDBUS: /* CardBus bridge header */