OpenCloudOS-Kernel/drivers/pci
Tyrel Datwyler e2413a7dae PCI: rpaphp: Fix slot registration for multiple slots under a PHB
The underlying slot hotplug registration code assumed multiple slots, but
the actual implementation is broken for multiple slots.

This went unnoticed for years do to the fact that PowerVM seems to only
ever provide a single hotplug slot per PHB.

Under qemu/kvm the hotplug slot model aligns more with x86 where
multiple slots are presented under a single PHB. As seen in the
following each additional slot after the first fails to register due to
each slot always being compared against the first child node of the PHB
in the device tree.

  rpaphp: RPA HOT Plug PCI Controller Driver version: 0.1
  rpaphp: Slot [Slot 0] registered
  rpaphp: pci_hp_register failed with error -16
  rpaphp: pci_hp_register failed with error -16
  rpaphp: pci_hp_register failed with error -16
  rpaphp: pci_hp_register failed with error -16

The registration logic is fixed so that each slot is compared
against the existing child devices of the PHB in the device tree to
determine present slots vs empty slots.

  rpaphp: RPA HOT Plug PCI Controller Driver version: 0.1
  rpaphp: Slot [C0] registered
  rpaphp: Slot [C1] registered
  rpaphp: Slot [C2] registered
  rpaphp: Slot [C3] registered
  rpaphp: Slot [C4] registered

Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Reviewed-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
[mpe: Massage changelog]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2016-07-20 11:54:55 +10:00
..
host Char / Misc driver update for 4.7-rc1 2016-05-20 21:20:31 -07:00
hotplug PCI: rpaphp: Fix slot registration for multiple slots under a PHB 2016-07-20 11:54:55 +10:00
pcie Merge branches 'pci/hotplug' and 'pci/resource' into next 2016-05-17 14:35:38 -05:00
Kconfig PCI: Provide common functions for ECAM mapping 2016-05-11 17:34:41 -05:00
Makefile PCI: Provide common functions for ECAM mapping 2016-05-11 17:34:41 -05:00
access.c PCI: Add pci_set_vpd_size() to set VPD size 2016-04-15 13:00:11 -05:00
ats.c PCI: Remove pci_ats_enabled() 2015-08-13 15:59:59 -05:00
bus.c PCI: Do not treat EPROBE_DEFER as device attach failure 2016-05-02 13:49:11 -05:00
ecam.c PCI: Provide common functions for ECAM mapping 2016-05-11 17:34:41 -05:00
ecam.h PCI: generic, thunder: Use generic ECAM API 2016-05-12 07:07:42 -05:00
host-bridge.c Merge branch 'pci/misc' into next 2015-04-10 08:27:18 -05:00
hotplug-pci.c PCI: Remove unnecessary __ref annotations 2014-04-29 17:36:44 -06:00
htirq.c x86/htirq: Use hierarchical irqdomain to manage Hypertransport interrupts 2015-04-24 15:36:50 +02:00
iov.c powerpc updates for 4.6 2016-03-19 15:38:41 -07:00
irq.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
msi.c PCI changes for the v4.5 merge window: 2016-01-21 11:52:16 -08:00
of.c PCI/MSI: Use of_msi_get_domain instead of open-coded "msi-parent" parsing 2015-10-16 13:07:14 +01:00
pci-acpi.c Power management and ACPI updates for v4.5-rc1 2016-01-12 20:25:09 -08:00
pci-driver.c PCI / PM: Tune down retryable runtime suspend error messages 2015-12-02 15:24:21 +01:00
pci-label.c PCI: Fix broken URL for Dell biosdevname 2016-02-29 12:03:19 -06:00
pci-stub.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
pci-sysfs.c PCI changes for the v4.7 merge window: 2016-05-19 13:10:54 -07:00
pci.c Merge branches 'pci/arm64' and 'pci/host-hv' into next 2016-05-17 14:35:46 -05:00
pci.h PCI: Add pci_set_vpd_size() to set VPD size 2016-04-15 13:00:11 -05:00
probe.c Merge branches 'pci/hotplug' and 'pci/resource' into next 2016-05-17 14:35:38 -05:00
proc.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
quirks.c Merge branches 'pci/enumeration', 'pci/hotplug', 'pci/misc', 'pci/ntb', 'pci/thunderbolt' and 'pci/virtualization' into next 2016-04-25 14:35:26 -05:00
remove.c Merge branch 'pci/resource' into next 2016-03-15 08:56:28 -05:00
rom.c PCI: Remove unused IORESOURCE_ROM_COPY and IORESOURCE_ROM_BIOS_COPY 2016-03-12 06:00:29 -06:00
search.c PCI: Add support for multiple DMA aliases 2016-04-11 14:34:32 -05:00
setup-bus.c PCI: Add pcibios_setup_bridge() 2016-06-21 15:30:51 +10:00
setup-irq.c PCI: Export symbols required for loadable host driver modules 2015-04-08 14:17:10 -05:00
setup-res.c PCI: Don't assign or reassign immutable resources 2016-03-08 12:14:31 -06:00
slot.c PCI: Hold pci_slot_mutex while searching bus->slots list 2015-07-30 16:19:53 -05:00
syscall.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
vc.c PCI: Use dev->has_secondary_link to find downstream PCIe links 2015-05-29 15:35:26 -05:00
vpd.c
xen-pcifront.c xen/pcifront: Fix mysterious crashes when NUMA locality information was extracted. 2016-02-15 14:34:57 +00:00