Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f004f4a authored by Mika Westerberg's avatar Mika Westerberg Committed by Bjorn Helgaas
Browse files

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: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent 84c8b58e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);