linux-stable/drivers/pci/pcie
Lukas Wunner a50ac6bfd6 PCI: Simplify disconnected marking
Commit 89ee9f7680 ("PCI: Add device disconnected state") iterates over
the devices on a parent bus, marks each as disconnected, then marks
each device's children as disconnected using pci_walk_bus().

The same can be achieved more succinctly by calling pci_walk_bus() on
the parent bus.  Moreover, this does not need to wait until acquiring
pci_lock_rescan_remove(), so move it out of that critical section.

The critical section in err.c contains a pci_dev_get() / pci_dev_put()
pair which was apparently copy-pasted from pciehp_pci.c.  In the latter
it serves the purpose of holding the struct pci_dev in place until the
Command register is updated.  err.c doesn't do anything like that, hence
the pair is unnecessary.  Remove it.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Oza Pawandeep <poza@codeaurora.org>
Cc: Sinan Kaya <okaya@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2018-09-17 16:34:35 -05:00
..
aer.c Merge branch 'pci/virtualization' 2018-08-15 14:59:06 -05:00
aer_inject.c PCI/AER: Hoist aerdrv.c, aer_inject.c up to drivers/pci/pcie/ 2018-06-11 08:11:39 -05:00
aspm.c PCI/ASPM: Convert to use sysfs_match_string() helper 2018-08-06 14:30:34 -05:00
dpc.c PCI/DPC: Remove indirection waiting for inactive link 2018-07-19 16:21:01 -05:00
err.c PCI: Simplify disconnected marking 2018-09-17 16:34:35 -05:00
Kconfig PCI/AER: Use "PCI Express" consistently in Kconfig text 2018-06-11 08:11:47 -05:00
Makefile PCI/AER: Hoist aerdrv.c, aer_inject.c up to drivers/pci/pcie/ 2018-06-11 08:11:39 -05:00
pme.c PCI/portdrv: Merge pcieport_if.h into portdrv.h 2018-03-09 11:42:01 -06:00
portdrv.h PCI: pciehp: Clear spurious events earlier on resume 2018-07-31 11:07:59 -05:00
portdrv_core.c PCI: pciehp: Clear spurious events earlier on resume 2018-07-31 11:07:59 -05:00
portdrv_pci.c Merge branch 'pci/hotplug' 2018-08-15 14:58:52 -05:00
ptm.c Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00