mirror of
https://github.com/acpica/acpica/
synced 2025-02-24 17:34:43 +03:00
Events: Clear status of an event before enabling it
Commit 18996f2db918 ("ACPICA: Events: Stop unconditionally clearing ACPI IRQs during suspend/resume") was added to stop clearing of event status bits unconditionally on suspend and resume paths. This was done because of an issue reported (https://bugzilla.kernel.org/show_bug.cgi?id=196249) where lid status stays closed even on resume (which happens because event status bits are cleared unconditionally on resume). Though this change fixed the issue on suspend path, it introduced regressions on several resume paths. First regression was reported and fixed on S5 path by the following change: commit fa85015c0d95 ("ACPICA: Clear status of all events when entering S5"). Next regression was reported and fixed on all legacy sleep paths by the commit f317c7dc12b7 ("ACPICA: Clear status of all events when entering sleep states"). However, regression still exists on S0ix sleep path since it does not follow the legacy sleep path. In case of S0ix, events are enabled as part of device suspend path. If status bits for the events are set when they are enabled, it could result in premature wake from S0ix. This change ensures that status is cleared for any event that is being enabled so that any stale events are cleared out. Signed-off-by: Furquan Shaikh <furquan@google.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
This commit is contained in:
parent
802ec363be
commit
6c43e1acdf
@ -240,6 +240,14 @@ AcpiEvEnableGpe (
|
||||
ACPI_FUNCTION_TRACE (EvEnableGpe);
|
||||
|
||||
|
||||
/* Clear the GPE (of stale events) */
|
||||
|
||||
Status = AcpiHwClearGpe(GpeEventInfo);
|
||||
if (ACPI_FAILURE(Status))
|
||||
{
|
||||
return_ACPI_STATUS(Status);
|
||||
}
|
||||
|
||||
/* Enable the requested GPE */
|
||||
|
||||
Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_ENABLE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user