linux/drivers/pci
Alan Stern 8537ab5ad7 PCI: Check for PME in targeted sleep state
[ Upstream commit 6496ebd7ed ]

One some systems, the firmware does not allow certain PCI devices to be put
in deep D-states.  This can cause problems for wakeup signalling, if the
device does not support PME# in the deepest allowed suspend state.  For
example, Pierre reports that on his system, ACPI does not permit his xHCI
host controller to go into D3 during runtime suspend -- but D3 is the only
state in which the controller can generate PME# signals.  As a result, the
controller goes into runtime suspend but never wakes up, so it doesn't work
properly.  USB devices plugged into the controller are never detected.

If the device relies on PME# for wakeup signals but is not capable of
generating PME# in the target state, the PCI core should accurately report
that it cannot do wakeup from runtime suspend.  This patch modifies the
pci_dev_run_wake() routine to add this check.

Reported-by: Pierre de Villemereuil <flyos@mailoo.org>
Tested-by: Pierre de Villemereuil <flyos@mailoo.org>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
CC: stable@vger.kernel.org
CC: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
History 2017-01-13 17:59:59 -05:00
..
host PCI: host: Mark PCIe/PCI (MSI) IRQ cascade handlers as IRQF_NO_THREAD 2016-02-09 22:56:22 -05:00
hotplug ACPI / PCI / hotplug: unlock in error path in acpiphp_enable_slot() 2016-02-15 15:42:28 -05:00
pcie PCI/AER: Flush workqueue on device remove to avoid use-after-free 2016-02-27 18:28:23 -05:00
access.c PCI: Add dev_flags bit to access VPD through function 0 2015-12-02 22:35:38 -05:00
ats.c PCI: Removed unused parts of Page Request Interface support 2014-01-10 14:00:47 -07:00
bus.c PCI: Fix minimum allocation address overwrite 2016-02-09 22:56:21 -05:00
host-bridge.c PCI: Remove unnecessary includes of <linux/init.h> 2014-04-14 16:12:37 -06:00
hotplug-pci.c PCI: Remove unnecessary __ref annotations 2014-04-29 17:36:44 -06:00
htirq.c PCI changes for the v3.16 merge window (part 2): 2014-06-12 13:20:24 -07:00
ioapic.c PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
iov.c PCI: Use device flag helper functions 2014-09-16 16:19:58 -06:00
irq.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
Kconfig PCI: Convert ioapic to be builtin only, not modular 2014-01-03 14:31:38 -07:00
Makefile Merge branch 'x86-nuke-platforms-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-04-02 13:15:58 -07:00
msi.c PCI/MSI: Add device flag indicating that 64-bit MSIs don't work 2014-11-24 14:11:34 +11:00
of.c PCI: OF: Don't crash when bridge parent is NULL. 2011-08-19 08:51:37 -07:00
pci-acpi.c PCI: Don't look for ACPI hotplug parameters if ACPI is disabled 2015-04-22 23:30:27 -04:00
pci-driver.c PCI: Generate uppercase hex for modalias var in uevent 2015-03-06 14:52:46 -08:00
pci-label.c ACPI / PCI: Fix sysfs acpi_index and label errors 2014-07-02 15:27:08 -06:00
pci-stub.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
pci-sysfs.c PCI: Support PCIe devices with short cfg_size 2016-09-02 23:42:11 -04:00
pci.c PCI: Check for PME in targeted sleep state 2017-01-13 17:59:59 -05:00
pci.h PCI: Add pci_bus_clip_resource() to clip to fit upstream window 2015-01-29 17:40:43 -08:00
probe.c PCI: Disable all BAR sizing for devices with non-compliant BARs 2016-06-06 19:11:05 -04:00
proc.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
quirks.c PCI: Limit config space size for Netronome NFP4000 2016-09-02 23:42:11 -04:00
remove.c Revert "PCI: Remove from bus_list and release resources in pci_release_dev()" 2014-02-01 10:24:31 -08:00
rom.c PCI: Fix infinite loop with ROM image of size 0 2015-03-06 14:52:46 -08:00
search.c PCI: Remove unused pci_find_upstream_pcie_bridge() 2014-09-22 14:46:13 -06:00
setup-bus.c PCI: Add pci_claim_bridge_resource() to clip window if necessary 2015-01-29 17:40:43 -08:00
setup-irq.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
setup-res.c PCI: Tidy resource assignment messages 2014-07-08 16:29:08 -06:00
slot.c VERIFY_OCTAL_PERMISSIONS: stricter checking for sysfs perms. 2014-03-24 12:21:00 +10:30
syscall.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
vc.c PCI: Rename PCI_VC_PORT_REG1/2 to PCI_VC_PORT_CAP1/2 2013-12-17 17:49:39 -07:00
vpd.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
xen-pcifront.c xen/pcifront: Fix mysterious crashes when NUMA locality information was extracted. 2016-03-07 21:15:19 -05:00