Skip to content

Commit afa0ce0

Browse files
rafaeljwgregkh
authored andcommitted
ACPI / EC: Restore polling during noirq suspend/resume phases
[ Upstream commit 3cd091a ] Commit 6625914 (ACPI / EC: Drop EC noirq hooks to fix a regression) modified the ACPI EC driver so that it doesn't switch over to busy polling mode during noirq stages of system suspend and resume in an attempt to fix an issue resulting from that behavior. However, that modification introduced a system resume regression on Thinkpad X240, so make the EC driver switch over to the polling mode during noirq stages of system suspend and resume again, which effectively reverts the problematic commit. Fixes: 6625914 (ACPI / EC: Drop EC noirq hooks to fix a regression) Link: https://bugzilla.kernel.org/show_bug.cgi?id=197863 Reported-by: Markus Demleitner <[email protected]> Tested-by: Markus Demleitner <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 85bd5c6 commit afa0ce0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/acpi/ec.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1927,13 +1927,19 @@ static int acpi_ec_suspend_noirq(struct device *dev)
19271927
ec->reference_count >= 1)
19281928
acpi_set_gpe(NULL, ec->gpe, ACPI_GPE_DISABLE);
19291929

1930+
if (acpi_sleep_no_ec_events())
1931+
acpi_ec_enter_noirq(ec);
1932+
19301933
return 0;
19311934
}
19321935

19331936
static int acpi_ec_resume_noirq(struct device *dev)
19341937
{
19351938
struct acpi_ec *ec = acpi_driver_data(to_acpi_device(dev));
19361939

1940+
if (acpi_sleep_no_ec_events())
1941+
acpi_ec_leave_noirq(ec);
1942+
19371943
if (ec_no_wakeup && test_bit(EC_FLAGS_STARTED, &ec->flags) &&
19381944
ec->reference_count >= 1)
19391945
acpi_set_gpe(NULL, ec->gpe, ACPI_GPE_ENABLE);

0 commit comments

Comments
 (0)