On Tue, Feb 13, 2018 at 5:32 PM, Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx> wrote: > 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@xxxxxxxxxxxxxxx> Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx> > --- > drivers/pci/hotplug/acpiphp_glue.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c > index 5efa21cdddc9..0aef35ee665a 100644 > --- a/drivers/pci/hotplug/acpiphp_glue.c > +++ b/drivers/pci/hotplug/acpiphp_glue.c > @@ -651,6 +651,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); > -- > 2.15.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html