Message ID | 5356594.Wd8M8VygiD@vostro.rjw.lan (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show |
On Thu, Aug 4, 2016 at 8:38 PM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote: > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > If a PCI bridge (or PCIe port) that is runtime-suspended gets an > ACPI hotplug notification, such as a bus check, it has to be resumed > before re-scanning the devices below it, or those devices will not > be accessible and will be treated as hot-removed. Just checking: do you want me to apply this as a patch, or are you adding it to your git tree and just cc'ing me as a FYI? Linus -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thursday, August 04, 2016 08:53:14 PM Linus Torvalds wrote: > On Thu, Aug 4, 2016 at 8:38 PM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote: > > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > > > If a PCI bridge (or PCIe port) that is runtime-suspended gets an > > ACPI hotplug notification, such as a bus check, it has to be resumed > > before re-scanning the devices below it, or those devices will not > > be accessible and will be treated as hot-removed. > > Just checking: do you want me to apply this as a patch, or are you > adding it to your git tree and just cc'ing me as a FYI? Please apply it directly if that's not a problem. Thanks, Rafael -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Aug 4, 2016 at 9:05 PM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote: > > Please apply it directly if that's not a problem. Ok, NP. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Index: linux-pm/drivers/pci/hotplug/acpiphp_glue.c =================================================================== --- linux-pm.orig/drivers/pci/hotplug/acpiphp_glue.c +++ linux-pm/drivers/pci/hotplug/acpiphp_glue.c @@ -675,6 +675,9 @@ static void acpiphp_check_bridge(struct if (bridge->is_going_away) return; + if (bridge->pci_dev) + pm_runtime_get_sync(&bridge->pci_dev->dev); + list_for_each_entry(slot, &bridge->slots, node) { struct pci_bus *bus = slot->bus; struct pci_dev *dev, *tmp; @@ -694,6 +697,9 @@ static void acpiphp_check_bridge(struct disable_slot(slot); } } + + if (bridge->pci_dev) + pm_runtime_put(&bridge->pci_dev->dev); } /*