kernel_optimize_test/drivers/pci
Rafael J. Wysocki cfcadfaad7 PCI / PM: Check device_may_wakeup() in pci_enable_wake()
Commit 0847684cfc (PCI / PM: Simplify device wakeup settings code)
went too far and dropped the device_may_wakeup() check from
pci_enable_wake() which causes wakeup to be enabled during system
suspend, hibernation or shutdown for some PCI devices that are not
allowed by user space to wake up the system from sleep (or power off).

As a result of this, excessive power is drawn by some of the affected
systems while in sleep states or off.

Restore the device_may_wakeup() check in pci_enable_wake(), but make
sure that the PCI bus type's runtime suspend callback will not call
device_may_wakeup() which is about system wakeup from sleep and not
about device wakeup from runtime suspend.

Fixes: 0847684cfc (PCI / PM: Simplify device wakeup settings code)
Reported-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Cc: 4.13+ <stable@vger.kernel.org> # 4.13+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
2018-05-10 16:50:26 +02:00
..
cadence
dwc PCI: kirin: Fix reset gpio name 2018-04-17 11:27:38 +01:00
endpoint
host PCI: aardvark: Fix PCIe Max Read Request Size setting 2018-04-16 11:48:45 +01:00
hotplug powerpc updates for 4.17 2018-04-07 12:08:19 -07:00
pcie Merge branch 'pci/portdrv' 2018-04-04 13:27:58 -05:00
switch
access.c Merge branch 'pci/vpd' 2018-04-04 13:28:40 -05:00
ats.c
bus.c
ecam.c
host-bridge.c
iov.c Merge branch 'pci/virtualization' 2018-04-04 13:28:26 -05:00
irq.c
Kconfig
Makefile
mmap.c
msi.c
of.c
pci-acpi.c
pci-driver.c PCI / PM: Do not clear state_saved in pci_pm_freeze() when smart suspend is set 2018-04-23 08:57:35 +02:00
pci-label.c
pci-mid.c
pci-stub.c
pci-sysfs.c Merge branch 'pci/vpd' 2018-04-04 13:28:40 -05:00
pci.c PCI / PM: Check device_may_wakeup() in pci_enable_wake() 2018-05-10 16:50:26 +02:00
pci.h Merge branch 'pci/vpd' 2018-04-04 13:28:40 -05:00
probe.c pci-v4.17-changes 2018-04-06 18:31:06 -07:00
proc.c
quirks.c PCI: Mark Broadcom HT1100 and HT2000 Root Port Extended Tags as broken 2018-04-10 14:44:21 -05:00
remove.c
rom.c
search.c
setup-bus.c
setup-irq.c
setup-res.c PCI: Remove messages about reassigning resources 2018-04-11 08:46:50 -05:00
slot.c Merge branch 'pci/misc' 2018-04-04 13:27:45 -05:00
syscall.c
vc.c
vpd.c pci-v4.17-changes 2018-04-06 18:31:06 -07:00
xen-pcifront.c