diff options
| author | Nate Lawson <njl@FreeBSD.org> | 2007-03-20 00:58:19 +0000 |
|---|---|---|
| committer | Nate Lawson <njl@FreeBSD.org> | 2007-03-20 00:58:19 +0000 |
| commit | 6e141df20070ba7f2299331357ba36bd32ccbbcb (patch) | |
| tree | 15f6366e0052b03417dca4d6a3d20da650f5a268 /sys/dev | |
| parent | ec002fee9957c147af90cc5159ef6d2f5538dc73 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/acpica/acpi_ec.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/sys/dev/acpica/acpi_ec.c b/sys/dev/acpica/acpi_ec.c index d099e01dee48a..8c7b2b97e364d 100644 --- a/sys/dev/acpica/acpi_ec.c +++ b/sys/dev/acpica/acpi_ec.c @@ -787,6 +787,7 @@ EcGpeHandler(void *Context) struct acpi_ec_softc *sc = Context; ACPI_STATUS Status; EC_STATUS EcStatus; + int query_pend; KASSERT(Context != NULL, ("EcGpeHandler called with NULL")); @@ -821,6 +822,7 @@ EcGpeHandler(void *Context) * it along to any potential waiters as it may be an IBE/OBF event. * If it is set, queue a query handler. */ + query_pend = FALSE; if ((EcStatus & EC_EVENT_SCI) == 0) { CTR1(KTR_ACPI, "ec event was IBE/OBF, status %#x", EcStatus); sc->ec_csrvalue = EcStatus; @@ -832,12 +834,19 @@ EcGpeHandler(void *Context) Context); if (ACPI_SUCCESS(Status)) { sc->ec_sci_pend = TRUE; - } else { + query_pend = TRUE; + } else printf("Queuing GPE query handler failed.\n"); - Status = AcpiEnableGpe(sc->ec_gpehandle, sc->ec_gpebit, ACPI_ISR); - if (ACPI_FAILURE(Status)) - printf("EcGpeHandler: AcpiEnableEvent failed\n"); - } + } + + /* + * If we didn't queue a query handler, which will eventually re-enable + * the GPE, re-enable it right now so we can get more events. + */ + if (!query_pend) { + Status = AcpiEnableGpe(sc->ec_gpehandle, sc->ec_gpebit, ACPI_ISR); + if (ACPI_FAILURE(Status)) + printf("EcGpeHandler: AcpiEnableGpe failed\n"); } EcUnlock(sc); |
