diff options
author | Zhao Yakui <yakui.zhao@intel.com> | 2008-08-11 14:57:50 +0800 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-10-22 17:59:57 -0400 |
commit | f5adfaa372c76423b6e8e4727a9701330374f364 (patch) | |
tree | b7783111c8f027d954506d7440d806817de13f6b /drivers/acpi/bus.c | |
parent | eab4b645769fa2f8703f5a3cb0cc4ac090d347af (diff) | |
download | kernel_samsung_smdk4412-f5adfaa372c76423b6e8e4727a9701330374f364.zip kernel_samsung_smdk4412-f5adfaa372c76423b6e8e4727a9701330374f364.tar.gz kernel_samsung_smdk4412-f5adfaa372c76423b6e8e4727a9701330374f364.tar.bz2 |
ACPI: Add "acpi.power_nocheck=1" to disable power state check in power transition
Maybe the incorrect power state is returned on the bogus bios, which
is different with the real power state. For example: the bios returns D0
state and the real power state is D3. OS expects to set the device to D0
state. In such case if OS uses the power state returned by the BIOS and
checks the device power state very strictly in power transition, the device
can't be transited to the correct power state.
So the boot option of "acpi.power_nocheck=1" is added to avoid checking
the device power in the course of device power transition.
http://bugzilla.kernel.org/show_bug.cgi?id=8049
http://bugzilla.kernel.org/show_bug.cgi?id=11000
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Li Shaohua <shaohua.li@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/bus.c')
-rw-r--r-- | drivers/acpi/bus.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index ccae305..91bdeb3 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -223,7 +223,19 @@ int acpi_bus_set_power(acpi_handle handle, int state) /* * Get device's current power state */ - acpi_bus_get_power(device->handle, &device->power.state); + if (!acpi_power_nocheck) { + /* + * Maybe the incorrect power state is returned on the bogus + * bios, which is different with the real power state. + * For example: the bios returns D0 state and the real power + * state is D3. OS expects to set the device to D0 state. In + * such case if OS uses the power state returned by the BIOS, + * the device can't be transisted to the correct power state. + * So if the acpi_power_nocheck is set, it is unnecessary to + * get the power state by calling acpi_bus_get_power. + */ + acpi_bus_get_power(device->handle, &device->power.state); + } if ((state == device->power.state) && !device->flags.force_power_state) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device is already at D%d\n", state)); |