Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1661806
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/6] USB / PCI / PM: Allow the PCI core to do the resume cleanup |
| Date | 2017-06-09 01:10 +0200 |
| Message-ID | <tQeIV-29h-3@gated-at.bofh.it> (permalink) |
| References | <tQ7xM-60p-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thursday, June 08, 2017 11:24:55 AM Alan Stern wrote:
> On Thu, 8 Jun 2017, Rafael J. Wysocki wrote:
>
> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> >
> > hcd_pci_resume_noirq() used as a universal _resume_noirq handler for
> > PCI USB controllers calls pci_back_from_sleep() which is unnecessary
> > and may become problematic.
> >
> > It is unnecessary, because the PCI bus type carries out post-suspend
> > cleanup of all PCI devices during resume and that covers all things
> > done by the pci_back_from_sleep(). There is no reason why USB cannot
> > follow all of the other PCI devices in that respect.
> >
> > It will become problematic after subsequent changes that make it
> > possible to go back to sleep again after executing dpm_resume_noirq()
> > if no valid system wakeup events have been detected at that point.
> > Namely, calling pci_back_from_sleep() at the _resume_noirq stage
> > will cause the wakeup status of the devices in question to be cleared
> > and if any of them has triggered system wakeup, that event may be
> > missed then.
> >
> > For the above reasons, drop the pci_back_from_sleep() invocation
> > from hcd_pci_resume_noirq().
> >
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > ---
> > drivers/usb/core/hcd-pci.c | 7 +------
> > 1 file changed, 1 insertion(+), 6 deletions(-)
> >
> > Index: linux-pm/drivers/usb/core/hcd-pci.c
> > ===================================================================
> > --- linux-pm.orig/drivers/usb/core/hcd-pci.c
> > +++ linux-pm/drivers/usb/core/hcd-pci.c
> > @@ -584,12 +584,7 @@ static int hcd_pci_suspend_noirq(struct
> >
> > static int hcd_pci_resume_noirq(struct device *dev)
> > {
> > - struct pci_dev *pci_dev = to_pci_dev(dev);
> > -
> > - powermac_set_asic(pci_dev, 1);
> > -
> > - /* Go back to D0 and disable remote wakeup */
> > - pci_back_from_sleep(pci_dev);
> > + powermac_set_asic(to_pci_dev(dev), 1);
> > return 0;
> > }
>
> Acked-by: Alan Stern <stern@rowland.harvard.edu>
Thanks!
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/6] ACPI / PM: Suspend-to-idle rework to deal with spurious ACPI wakeups "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-08 02:20 +0200
[PATCH 1/6] ACPI / PM: Run wakeup notify handlers synchronously "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-08 02:20 +0200
[PATCH 5/6] PM / sleep: Print timing information if debug is enabled "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-08 02:20 +0200
[PATCH 3/6] ACPI / PM: Change log level of wakeup-related message "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-08 02:20 +0200
[PATCH 6/6] ACPI / PM: Ignore spurious SCI wakeups from suspend-to-idle "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-08 02:20 +0200
[PATCH 2/6] USB / PCI / PM: Allow the PCI core to do the resume cleanup "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-08 02:20 +0200
Re: [PATCH 2/6] USB / PCI / PM: Allow the PCI core to do the resume cleanup Alan Stern <stern@rowland.harvard.edu> - 2017-06-08 17:30 +0200
Re: [PATCH 2/6] USB / PCI / PM: Allow the PCI core to do the resume cleanup "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-09 01:10 +0200
[PATCH 4/6] ACPI / PM: Clean up device wakeup enable/disable code "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-08 02:20 +0200
Re: [PATCH 0/6] ACPI / PM: Suspend-to-idle rework to deal with spurious ACPI wakeups Hans de Goede <hdegoede@redhat.com> - 2017-06-08 09:30 +0200
Re: [PATCH 0/6] ACPI / PM: Suspend-to-idle rework to deal with spurious ACPI wakeups Dominik Brodowski <linux@dominikbrodowski.net> - 2017-06-08 10:50 +0200
Re: [PATCH 0/6] ACPI / PM: Suspend-to-idle rework to deal with spurious ACPI wakeups "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-08 14:10 +0200
[PATCH v2 0/8] ACPI / PM: Suspend-to-idle rework to deal with spurious ACPI wakeups "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-12 23:10 +0200
[PATCH v2 6/8] PCI / PM: Restore PME Enable if skipping wakeup setup "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-12 23:10 +0200
Re: [PATCH v2 6/8] PCI / PM: Restore PME Enable if skipping wakeup setup Bjorn Helgaas <helgaas@kernel.org> - 2017-06-14 20:20 +0200
[PATCH v2 4/8] ACPI / PM: Clean up device wakeup enable/disable code "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-12 23:10 +0200
[PATCH v2 5/8] PM / sleep: Print timing information if debug is enabled "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-12 23:10 +0200
Re: [PATCH v2 5/8] PM / sleep: Print timing information if debug is enabled Joe Perches <joe@perches.com> - 2017-06-13 00:20 +0200
[PATCH v2 8/8] ACPI / PM: Ignore spurious SCI wakeups from suspend-to-idle "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-12 23:10 +0200
[PATCH v2 3/8] ACPI / PM: Change log level of wakeup-related message "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-12 23:10 +0200
[PATCH v2 2/8] USB / PCI / PM: Allow the PCI core to do the resume cleanup "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-12 23:10 +0200
Re: [PATCH v2 2/8] USB / PCI / PM: Allow the PCI core to do the resume cleanup Greg KH <greg@kroah.com> - 2017-06-13 11:00 +0200
Re: [PATCH v2 2/8] USB / PCI / PM: Allow the PCI core to do the resume cleanup "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-13 13:30 +0200
[PATCH v2 1/8] ACPI / PM: Run wakeup notify handlers synchronously "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-12 23:10 +0200
Re: [PATCH v2 1/8] ACPI / PM: Run wakeup notify handlers synchronously Bjorn Helgaas <helgaas@kernel.org> - 2017-06-14 20:20 +0200
Re: [PATCH v2 1/8] ACPI / PM: Run wakeup notify handlers synchronously "Rafael J. Wysocki" <rafael@kernel.org> - 2017-06-15 00:30 +0200
[PATCH v2 7/8] platform/x86: Add driver for ACPI INT0002 Virtual GPIO device "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-12 23:10 +0200
Re: [PATCH v2 0/8] ACPI / PM: Suspend-to-idle rework to deal with spurious ACPI wakeups Dominik Brodowski <linux@dominikbrodowski.net> - 2017-06-13 08:00 +0200
Re: [PATCH v2 0/8] ACPI / PM: Suspend-to-idle rework to deal with spurious ACPI wakeups "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-13 13:30 +0200
csiph-web