Skip to content

Commit

Permalink
ACPI: fix suspend regression due to idle update
Browse files Browse the repository at this point in the history
Earlier patch (bc71bec) 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>
  • Loading branch information
Venkatesh Pallipadi authored and Len Brown committed Feb 14, 2008
1 parent e760e71 commit b077fba
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,14 @@ static int acpi_idle_enter_c1(struct cpuidle_device *dev,
return 0;

local_irq_disable();

/* Do not access any ACPI IO ports in suspend path */
if (acpi_idle_suspend) {
acpi_safe_halt();
local_irq_enable();
return 0;
}

if (pr->flags.bm_check)
acpi_idle_update_bm_rld(pr, cx);

Expand Down

0 comments on commit b077fba

Please sign in to comment.