diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2018-05-29 18:02:23 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2018-06-04 19:08:06 +0200 |
commit | 8f004f4a34fd129622567cbec381101cc5ff7f09 (patch) | |
tree | ffba13fddf691eb2e151d6e61697cd7045a1ff7d /drivers/pci | |
parent | ACPI / hotplug / PCI: Don't scan bridges managed by native hotplug (diff) | |
download | linux-8f004f4a34fd129622567cbec381101cc5ff7f09.tar.xz linux-8f004f4a34fd129622567cbec381101cc5ff7f09.zip |
ACPI / hotplug / PCI: Mark stale PCI devices disconnected
Following PCIehp mark the unplugged PCI devices disconnected. This makes
sure PCI core code leaves the now missing hardware registers alone.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index bc9e19642567..b526565b0464 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c @@ -649,6 +649,11 @@ static void trim_stale_devices(struct pci_dev *dev) alive = pci_device_is_present(dev); if (!alive) { + pci_dev_set_disconnected(dev, NULL); + if (pci_has_subordinate(dev)) + pci_walk_bus(dev->subordinate, pci_dev_set_disconnected, + NULL); + pci_stop_and_remove_bus_device(dev); if (adev) acpi_bus_trim(adev); |