aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>2008-02-11 18:20:27 -0500
committerLen Brown <len.brown@intel.com>2008-02-13 23:59:31 -0500
commitb077fbada161479d9a32a7730d2822d5e737b306 (patch)
tree2653c87aebf041ba0fb175a23401ee894d83d95f /drivers/acpi
parente760e716d47b48caf98da348368fd41b4a9b9e7e (diff)
ACPI: fix suspend regression due to idle update
Earlier patch (bc71bec91f9875ef825d12104acf3bf4ca215fa4) broke suspend resume on many laptops. The problem was reported by Carlos R. Mafra and Calvin Walton, who bisected the issue to above patch. The problem was because, C2 and C3 code were calling acpi_idle_enter_c1 directly, with C2 or C3 as state parameter, while suspend/resume was in progress. The patch bc71bec started making use of that state information, assuming that it would always be referring to C1 state. This caused the problem with suspend-resume as we ended up using C2/C3 state indirectly. Fix this by adding acpi_idle_suspend check in enter_c1. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/processor_idle.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 32003fdc91e8..1f022b0846d4 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -1420,6 +1420,14 @@ static int acpi_idle_enter_c1(struct cpuidle_device *dev,
1420 return 0; 1420 return 0;
1421 1421
1422 local_irq_disable(); 1422 local_irq_disable();
1423
1424 /* Do not access any ACPI IO ports in suspend path */
1425 if (acpi_idle_suspend) {
1426 acpi_safe_halt();
1427 local_irq_enable();
1428 return 0;
1429 }
1430
1423 if (pr->flags.bm_check) 1431 if (pr->flags.bm_check)
1424 acpi_idle_update_bm_rld(pr, cx); 1432 acpi_idle_update_bm_rld(pr, cx);
1425 1433