linux/include/acpi
Rafael J. Wysocki 1ba51a7c14 ACPI / PCI / PM: Rework acpi_pci_propagate_wakeup()
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: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
2017-08-01 14:05:03 +02:00
..
platform ACPICA: Use designated initializers 2017-06-27 22:27:24 +02:00
acbuffer.h ACPICA: Source tree: Update copyright notices to 2017 2017-02-09 14:47:02 +01:00
acconfig.h ACPICA: iasl: add ASL conversion tool 2017-04-28 21:56:10 +02:00
acexcep.h ACPICA: Source tree: Update copyright notices to 2017 2017-02-09 14:47:02 +01:00
acnames.h ACPICA: Source tree: Update copyright notices to 2017 2017-02-09 14:47:02 +01:00
acoutput.h ACPICA: Source tree: Update copyright notices to 2017 2017-02-09 14:47:02 +01:00
acpi_bus.h ACPI / PCI / PM: Rework acpi_pci_propagate_wakeup() 2017-08-01 14:05:03 +02:00
acpi_drivers.h Revert "ACPI, PCI, IRQ: remove redundant code in acpi_irq_penalty_init()" 2016-07-02 01:38:34 +02:00
acpi_io.h ACPI / osl: Remove deprecated acpi_get_table_with_size()/early_acpi_os_unmap_memory() 2016-12-21 02:36:38 +01:00
acpi_lpat.h ACPI / LPAT: Common table processing functions 2015-01-29 21:02:10 +08:00
acpi_numa.h ACPI: NUMA: add missing include in acpi_numa.h 2017-07-24 22:27:43 +02:00
acpi.h ACPICA: Source tree: Update copyright notices to 2017 2017-02-09 14:47:02 +01:00
acpiosxf.h ACPICA: Source tree: Update copyright notices to 2017 2017-02-09 14:47:02 +01:00
acpixf.h ACPICA: Update version to 20170531 2017-06-27 22:25:28 +02:00
acrestyp.h Merge branches 'acpi-spcr', 'acpi-osi', 'acpi-bus', 'acpi-scan' and 'acpi-misc' 2017-07-10 22:46:21 +02:00
actbl1.h ACPICA: Add support for new SRAT subtable 2017-06-12 14:58:38 +02:00
actbl2.h ACPICA: Add header support for TPM2 table changes 2017-06-12 14:58:38 +02:00
actbl3.h ACPICA: Add support for new PCCT subtables 2017-06-12 14:58:39 +02:00
actbl.h ACPICA: Tables: Mechanism to handle late stage acpi_get_table() imbalance 2017-06-12 14:09:29 +02:00
actypes.h ACPICA: Comment update: spelling/format. No functional change 2017-06-27 22:25:21 +02:00
acuuid.h ACPICA: Added two new UUID values 2017-06-12 14:50:34 +02:00
apei.h acpi, apei, ghes: Factor out ioremap virtual memory for IRQ and NMI context. 2014-07-22 15:05:06 -07:00
button.h ACPI: Eliminate CONFIG_.*{, _MODULE} #ifdef in favor of IS_ENABLED() 2015-09-15 03:05:45 +02:00
cppc_acpi.h ACPI / CPPC: add sysfs entries for CPPC perf capabilities 2017-04-18 23:37:50 +02:00
ghes.h arm/arm64: KVM: add guest SEA support 2017-06-22 18:22:05 +01:00
hed.h ACPI Hardware Error Device (PNP0C33) support 2010-05-19 22:40:24 -04:00
pcc.h mailbox: PCC: Fix return value of pcc_mbox_request_channel() 2016-10-17 14:26:49 +02:00
pdc_intel.h ACPI: Enable bit 11 in _PDC to advertise hw coord 2009-02-07 00:41:14 -05:00
processor.h ACPI / processor: Make acpi_processor_ppc_has_changed() void 2016-11-21 14:35:42 +01:00
reboot.h Add the ability to reset the machine using the RESET_REG in ACPI's FADT table. 2008-07-16 23:27:08 +02:00
video.h ACPI / video: Move ACPI_VIDEO_NOTIFY_* defines to acpi/video.h 2016-11-16 23:07:43 +01:00