linux/drivers/pci
Yijing Wang ba518e3c17 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>
2013-01-25 09:21:10 -07:00
..
hotplug PCI: pciehp: Iterate over all devices in slot, not functions 0-7 2013-01-25 09:21:10 -07:00
pcie PCI/PM: Do not suspend port if any subordinate device needs PME polling 2012-12-26 10:39:23 -07:00
access.c PCI: Add accessors for PCI Express Capability 2012-08-23 09:41:20 -06:00
ats.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-01-11 18:50:26 -08:00
bus.c Merge branch 'pci/mjg-pci-roms-from-efi' into next 2012-12-06 14:37:32 -07:00
host-bridge.c PCI: add host bridge release support 2012-04-30 14:52:43 -06:00
hotplug-pci.c PCI: hotplug: remove pci_do_scan_bus() 2012-06-13 15:42:27 -06:00
htirq.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
ioapic.c PCI changes for the v3.8 merge window: 2012-12-13 12:14:47 -08:00
iov.c PCI: Remove useless "!dev" tests 2012-11-09 21:40:09 -07:00
irq.c PCI: Convert dev_printk(KERN_<LEVEL> to dev_<level>( 2012-11-07 15:24:18 -07:00
Kconfig PCI: Drop bogus default from ARCH_SUPPORTS_MSI 2012-09-10 16:49:52 -06:00
Makefile PCI: Always build setup-bus when PCI is enabled 2012-11-28 13:00:58 -08:00
msi.c s390/pci: PCI adapter interrupts for MSI/MSI-X 2012-11-30 17:47:21 +01:00
msi.h
of.c PCI: OF: Don't crash when bridge parent is NULL. 2011-08-19 08:51:37 -07:00
pci-acpi.c ACPI / PM: Move routines for adding/removing device wakeup notifiers 2012-11-15 00:15:16 +01:00
pci-driver.c PCI changes for the v3.8 merge window: 2012-12-13 12:14:47 -08:00
pci-label.c switch ->is_visible() to returning umode_t 2012-01-03 22:54:55 -05:00
pci-stub.c PCI: Convert dev_printk(KERN_<LEVEL> to dev_<level>( 2012-11-07 15:24:18 -07:00
pci-sysfs.c PCI: Remove spurious error for sriov_numvfs store and simplify flow 2012-12-26 10:39:22 -07:00
pci.c PCI: Rename pci_enable_ari() to pci_configure_ari() 2013-01-25 09:21:10 -07:00
pci.h PCI: Rename pci_enable_ari() to pci_configure_ari() 2013-01-25 09:21:10 -07:00
probe.c PCI: Consolidate "next-function" functions 2013-01-25 09:21:10 -07:00
proc.c PCI/PM: Fix proc config reg access for D3cold and bridge suspending 2012-11-05 10:46:23 -07:00
quirks.c PCI: Reduce Ricoh 0xe822 SD card reader base clock frequency to 50MHz 2012-12-26 10:43:06 -07:00
remove.c PCI: Add pci_stop_and_remove_root_bus() 2012-11-03 16:26:37 -06:00
rom.c PCI: Use phys_addr_t for physical ROM address 2012-12-10 11:24:42 -07:00
search.c Merge branch 'pci/feng-avoid-kmalloc' into next 2012-09-10 16:31:08 -06:00
setup-bus.c PCI: Move out pci_enable_bridges out of assign_unsigned_bus_res 2012-11-03 16:20:30 -06:00
setup-irq.c PCI: Provide a default pcibios_update_irq() 2012-09-18 17:28:21 -06:00
setup-res.c Merge branch 'pci/nikhil-big-bar-fixes' into next 2012-07-18 14:06:20 -06:00
slot.c pci: add module.h to files implicitly relying on its presence. 2011-10-31 19:31:23 -04:00
syscall.c
vpd.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
xen-pcifront.c PCI changes for the v3.8 merge window: 2012-12-13 12:14:47 -08:00