diff options
Diffstat (limited to 'source/components/events/evgpe.c')
-rw-r--r-- | source/components/events/evgpe.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/source/components/events/evgpe.c b/source/components/events/evgpe.c index c31f0b385197..939402559e0b 100644 --- a/source/components/events/evgpe.c +++ b/source/components/events/evgpe.c @@ -761,22 +761,6 @@ AcpiEvGpeDispatch ( } /* - * If edge-triggered, clear the GPE status bit now. Note that - * level-triggered events are cleared after the GPE is serviced. - */ - if ((GpeEventInfo->Flags & ACPI_GPE_XRUPT_TYPE_MASK) == - ACPI_GPE_EDGE_TRIGGERED) - { - Status = AcpiHwClearGpe (GpeEventInfo); - if (ACPI_FAILURE (Status)) - { - ACPI_EXCEPTION ((AE_INFO, Status, - "Unable to clear GPE %02X", GpeNumber)); - return_UINT32 (ACPI_INTERRUPT_NOT_HANDLED); - } - } - - /* * Always disable the GPE so that it does not keep firing before * any asynchronous activity completes (either from the execution * of a GPE method or an asynchronous GPE handler.) @@ -794,6 +778,24 @@ AcpiEvGpeDispatch ( } /* + * If edge-triggered, clear the GPE status bit now. Note that + * level-triggered events are cleared after the GPE is serviced. + */ + if ((GpeEventInfo->Flags & ACPI_GPE_XRUPT_TYPE_MASK) == + ACPI_GPE_EDGE_TRIGGERED) + { + Status = AcpiHwClearGpe (GpeEventInfo); + if (ACPI_FAILURE (Status)) + { + ACPI_EXCEPTION ((AE_INFO, Status, + "Unable to clear GPE %02X", GpeNumber)); + (void) AcpiHwLowSetGpe (GpeEventInfo, + ACPI_GPE_CONDITIONAL_ENABLE); + return_UINT32 (ACPI_INTERRUPT_NOT_HANDLED); + } + } + + /* * Dispatch the GPE to either an installed handler or the control * method associated with this GPE (_Lxx or _Exx). If a handler * exists, we invoke it and do not attempt to run the method. |