mirror of
https://github.com/torvalds/linux.git
synced 2024-12-01 16:41:39 +00:00
7d08f21f8c
Iain reports that USB devices can't be used to wake a Lenovo Z13 from
suspend. This occurs because on some AMD platforms, even though the Root
Ports advertise PME_Support for D3hot and D3cold, wakeup events from
devices on a USB4 controller don't result in wakeup interrupts from the
Root Port when amd-pmc has put the platform in a hardware sleep state.
If amd-pmc will be involved in the suspend, remove D3hot and D3cold from
the PME_Support mask of Root Ports above USB4 controllers so we avoid those
states if we need wakeups.
Restore D3 support at resume so that it can be used by runtime suspend.
This affects both AMD Rembrandt and Phoenix SoCs.
"pm_suspend_target_state == PM_SUSPEND_ON" means we're doing runtime
suspend, and amd-pmc will not be involved. In that case PMEs work as
advertised in D3hot/D3cold, so we don't need to do anything.
Note that amd-pmc is technically optional, and there's no need for this
quirk if it's not present, but we assume it's always present because power
consumption is so high without it.
Fixes:
|
||
---|---|---|
.. | ||
acpi.c | ||
amd_bus.c | ||
broadcom_bus.c | ||
bus_numa.c | ||
bus_numa.h | ||
ce4100.c | ||
common.c | ||
direct.c | ||
early.c | ||
fixup.c | ||
i386.c | ||
init.c | ||
intel_mid_pci.c | ||
irq.c | ||
legacy.c | ||
Makefile | ||
mmconfig_32.c | ||
mmconfig_64.c | ||
mmconfig-shared.c | ||
numachip.c | ||
olpc.c | ||
pcbios.c | ||
sta2x11-fixup.c | ||
xen.c |