aboutsummaryrefslogtreecommitdiff
path: root/include/acpi
diff options
context:
space:
mode:
authorKen Xue2015-12-09 16:17:30 +0800
committerRafael J. Wysocki2015-12-09 23:36:22 +0100
commitcd7f84c02825cfca6cc86826395167479bdc1a05 (patch)
treec0e691f234e12a75a928c30aeb0dfd05a3c2c28b /include/acpi
parent527e9316f8ec44bd53d90fb9f611fa7ffff52bb9 (diff)
ACPI / PM: Support D3 COLD device in old BIOS for ZPODD
D3cold is only regarded as valid if the "_PR3" object is present for the given device after the commit 20dacb71ad28 ("ACPI/PM: Rework device power management to follow ACPI 6"). But some old BIOS only defined "_PS3" for the D3COLD device, such as ZPODD device. And old kernel also believes the device with "_PS3" is a D3COLD device. So, add some logics for supporting D3 COLD device with old BIOS which is compatible with earlier ACPI spec and kernel behavior. Link: http://marc.info/?l=linux-acpi&m=144946938709759&w=2 Signed-off-by: Ken Xue <Ken.Xue@amd.com> Reported-and-tested-by: Gang Long <Gang.Long@amd.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/acpi_bus.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index ad0a5ff3d4cd..9894b752cbb1 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -631,7 +631,9 @@ static inline bool acpi_device_can_wakeup(struct acpi_device *adev)
static inline bool acpi_device_can_poweroff(struct acpi_device *adev)
{
- return adev->power.states[ACPI_STATE_D3_COLD].flags.valid;
+ return adev->power.states[ACPI_STATE_D3_COLD].flags.valid ||
+ ((acpi_gbl_FADT.header.revision < 6) &&
+ adev->power.states[ACPI_STATE_D3_HOT].flags.explicit_set);
}
#else /* CONFIG_ACPI */