ACPI: PM: s2idle: Refine active GPEs check
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 25 Mar 2020 10:55:48 +0000 (11:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Apr 2020 08:50:09 +0000 (10:50 +0200)
commite7251a88d387b7dd6a1e20031b19ba076094c007
tree03cdec556ff49bba9e32dc2271cee7fd8735083f
parentdd993e283bc37164379121812870bd348746dba2
ACPI: PM: s2idle: Refine active GPEs check

commit d5406284ff803a578ca503373624312770319054 upstream.

The check for any active GPEs added by commit fdde0ff8590b ("ACPI:
PM: s2idle: Prevent spurious SCIs from waking up the system") turns
out to be insufficiently precise to prevent some systems from
resuming prematurely due to a spurious EC wakeup, so refine it
by first checking if any GPEs other than the EC GPE are active
and skipping all of the SCIs coming from the EC that do not produce
any genuine wakeup events after processing.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=206629
Fixes: fdde0ff8590b ("ACPI: PM: s2idle: Prevent spurious SCIs from waking up the system")
Reported-by: Ondřej Caletka <ondrej@caletka.cz>
Tested-by: Ondřej Caletka <ondrej@caletka.cz>
Cc: 5.4+ <stable@vger.kernel.org> # 5.4+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/ec.c
drivers/acpi/internal.h
drivers/acpi/sleep.c