diff options
author | Gabe Black <gabe.black@ni.com> | 2009-10-06 11:45:19 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-11-04 16:06:36 -0500 |
commit | bc577d2bb98cc44371287fce3e892d26ad4050a8 (patch) | |
tree | 801ff1dbf10301bda75879141482eb226192e280 /drivers | |
parent | 0584396157ad2d008e2cc76b4ed6254151183a25 (diff) |
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')
-rw-r--r-- | drivers/pci/probe.c | 6 |
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) | |||
730 | u32 class; | 730 | u32 class; |
731 | u8 hdr_type; | 731 | u8 hdr_type; |
732 | struct pci_slot *slot; | 732 | struct pci_slot *slot; |
733 | int pos = 0; | ||
733 | 734 | ||
734 | if (pci_read_config_byte(dev, PCI_HEADER_TYPE, &hdr_type)) | 735 | if (pci_read_config_byte(dev, PCI_HEADER_TYPE, &hdr_type)) |
735 | return -EIO; | 736 | return -EIO; |
@@ -822,6 +823,11 @@ int pci_setup_device(struct pci_dev *dev) | |||
822 | dev->transparent = ((dev->class & 0xff) == 1); | 823 | dev->transparent = ((dev->class & 0xff) == 1); |
823 | pci_read_bases(dev, 2, PCI_ROM_ADDRESS1); | 824 | pci_read_bases(dev, 2, PCI_ROM_ADDRESS1); |
824 | set_pcie_hotplug_bridge(dev); | 825 | set_pcie_hotplug_bridge(dev); |
826 | pos = pci_find_capability(dev, PCI_CAP_ID_SSVID); | ||
827 | if (pos) { | ||
828 | pci_read_config_word(dev, pos + PCI_SSVID_VENDOR_ID, &dev->subsystem_vendor); | ||
829 | pci_read_config_word(dev, pos + PCI_SSVID_DEVICE_ID, &dev->subsystem_device); | ||
830 | } | ||
825 | break; | 831 | break; |
826 | 832 | ||
827 | case PCI_HEADER_TYPE_CARDBUS: /* CardBus bridge header */ | 833 | case PCI_HEADER_TYPE_CARDBUS: /* CardBus bridge header */ |