Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1695700
| From | Mika Westerberg <mika.westerberg@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 3/3] ACPI / PCI / PM: Rework acpi_pci_propagate_wakeup() |
| Date | 2017-07-25 14:50 +0200 |
| Message-ID | <u77rI-2RA-13@gated-at.bofh.it> (permalink) |
| References | <u5FHc-4X6-3@gated-at.bofh.it> <u5FHd-4X6-29@gated-at.bofh.it> <u5NOq-1zO-5@gated-at.bofh.it> |
| Organization | Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo |
On Fri, Jul 21, 2017 at 11:30:24PM +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > The acpi_pci_propagate_wakeup() routine is there to handle cases in > which PCI bridges (or PCIe ports) are expected to signal wakeup > for devices below them, but currently it doesn't do that correctly. > > The problem is that acpi_pci_propagate_wakeup() uses > acpi_pm_set_device_wakeup() for bridges and if that routine is > called for multiple times to disable wakeup for the same device, > it will disable it on the first invocation and the next calls > will have no effect (it works analogously when called to enable > wakeup, but that is not a problem). > > Now, say acpi_pci_propagate_wakeup() has been called for two > different devices under the same bridge and it has called > acpi_pm_set_device_wakeup() for that bridge each time. The > bridge is now enabled to generate wakeup signals. Next, > suppose that one of the devices below it resumes and > acpi_pci_propagate_wakeup() is called to disable wakeup for that > device. It will then call acpi_pm_set_device_wakeup() for the bridge > and that will effectively disable remote wakeup for all devices under > it even though some of them may still be suspended and remote wakeup > may be expected to work for them. > > To address this (arguably theoretical) issue, allow > wakeup.enable_count under struct acpi_device to grow beyond 1 in > certain situations. In particular, allow that to happen in > acpi_pci_propagate_wakeup() when wakeup is enabled or disabled > for PCI bridges, so that wakeup is actually disabled for the > bridge when all devices under it resume and not when just one > of them does that. > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/3] PCI / ACPI / PM: Fix propagation of wakeup settings to bridges "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-07-21 15:00 +0200
[PATCH 3/3] ACPI / PCI / PM: Rework acpi_pci_propagate_wakeup() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-07-21 15:00 +0200
Re: [PATCH 3/3] ACPI / PCI / PM: Rework acpi_pci_propagate_wakeup() Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-07-21 17:50 +0200
Re: [PATCH 3/3] ACPI / PCI / PM: Rework acpi_pci_propagate_wakeup() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-07-21 23:00 +0200
Re: [PATCH 3/3] ACPI / PCI / PM: Rework acpi_pci_propagate_wakeup() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-07-21 23:20 +0200
[PATCH v2 3/3] ACPI / PCI / PM: Rework acpi_pci_propagate_wakeup() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-07-21 23:40 +0200
Re: [PATCH v2 3/3] ACPI / PCI / PM: Rework acpi_pci_propagate_wakeup() Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-07-21 23:50 +0200
Re: [PATCH v2 3/3] ACPI / PCI / PM: Rework acpi_pci_propagate_wakeup() Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-07-25 14:50 +0200
[PATCH 1/3] PCI / PM: Skip bridges in pci_enable_wake() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-07-21 15:00 +0200
Re: [PATCH 1/3] PCI / PM: Skip bridges in pci_enable_wake() Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-07-25 14:50 +0200
Re: [PATCH 0/3] PCI / ACPI / PM: Fix propagation of wakeup settings to bridges "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-07-28 02:50 +0200
csiph-web