summaryrefslogtreecommitdiff
path: root/drivers/pci/hotplug/cpci_hotplug_pci.c
diff options
context:
space:
mode:
authorYijing Wang <wangyijing@huawei.com>2013-01-15 07:12:19 +0400
committerBjorn Helgaas <bhelgaas@google.com>2013-01-25 20:21:10 +0400
commitba518e3c177547dfebf7fa7252cea0c850e7ce25 (patch)
treed4095f6395b8159a8301ee155ce81a5a33f9193b /drivers/pci/hotplug/cpci_hotplug_pci.c
parentb1bd58e448f28531207124eea3fd43b81d6f8d06 (diff)
downloadlinux-ba518e3c177547dfebf7fa7252cea0c850e7ce25.tar.xz
PCI: pciehp: Iterate over all devices in slot, not functions 0-7
Currently, we enumerate devices in a slot with pci_scan_slot(), then iterate through all the devices we found by looking for functions 0-7. But that's wrong for ARI devices, which may have function numbers up to 255. This means that when we hot-add an ARI device, pciehp only initializes functions 0-7, and other functions don't work correctly. Additionally, if we hot-remove the device, pciehp only removes functions 0-7, leaving stale pci_dev structures for any other functions. This patch fixes the problem by iterating over devices in a slot by using the upstream bridge's "bus->devices" list instead. [bhelgaas: changelog] Signed-off-by: Yijing Wang <wangyijing@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/hotplug/cpci_hotplug_pci.c')
0 files changed, 0 insertions, 0 deletions