aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/bus.c
diff options
context:
space:
mode:
authorZhao Yakui <yakui.zhao@intel.com>2008-08-11 02:57:50 -0400
committerLen Brown <len.brown@intel.com>2008-10-22 17:59:57 -0400
commitf5adfaa372c76423b6e8e4727a9701330374f364 (patch)
treeb7783111c8f027d954506d7440d806817de13f6b /drivers/acpi/bus.c
parenteab4b645769fa2f8703f5a3cb0cc4ac090d347af (diff)
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.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index ccae305ee55d..91bdeb3b081e 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)
223 /* 223 /*
224 * Get device's current power state 224 * Get device's current power state
225 */ 225 */
226 acpi_bus_get_power(device->handle, &device->power.state); 226 if (!acpi_power_nocheck) {
227 /*
228 * Maybe the incorrect power state is returned on the bogus
229 * bios, which is different with the real power state.
230 * For example: the bios returns D0 state and the real power
231 * state is D3. OS expects to set the device to D0 state. In
232 * such case if OS uses the power state returned by the BIOS,
233 * the device can't be transisted to the correct power state.
234 * So if the acpi_power_nocheck is set, it is unnecessary to
235 * get the power state by calling acpi_bus_get_power.
236 */
237 acpi_bus_get_power(device->handle, &device->power.state);
238 }
227 if ((state == device->power.state) && !device->flags.force_power_state) { 239 if ((state == device->power.state) && !device->flags.force_power_state) {
228 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device is already at D%d\n", 240 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device is already at D%d\n",
229 state)); 241 state));