FreeBSD Bugzilla – Attachment 151884 Details for
Bug 162859
[acpi] ACPI battery/acline monitoring partialy working (switching)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
A patch to test
ec.diff (text/plain), 2.73 KB, created by
Jung-uk Kim
on 2015-01-20 05:38:11 UTC
(
hide
)
Description:
A patch to test
Filename:
MIME Type:
Creator:
Jung-uk Kim
Created:
2015-01-20 05:38:11 UTC
Size:
2.73 KB
patch
obsolete
>Index: sys/dev/acpica/acpi_ec.c >=================================================================== >--- sys/dev/acpica/acpi_ec.c (revision 277405) >+++ sys/dev/acpica/acpi_ec.c (working copy) >@@ -620,7 +620,7 @@ EcGpeQueryHandler(void *Context) > struct acpi_ec_softc *sc = (struct acpi_ec_softc *)Context; > UINT8 Data; > ACPI_STATUS Status; >- int retry, sci_enqueued; >+ int retry; > char qxx[5]; > > ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); >@@ -631,7 +631,7 @@ EcGpeQueryHandler(void *Context) > if (ACPI_FAILURE(Status)) { > device_printf(sc->ec_dev, "GpeQuery lock error: %s\n", > AcpiFormatException(Status)); >- return; >+ goto finish; > } > > /* >@@ -641,7 +641,6 @@ EcGpeQueryHandler(void *Context) > * that may arise from running the query from causing another query > * to be queued, we clear the pending flag only after running it. > */ >- sci_enqueued = sc->ec_sci_pend; > for (retry = 0; retry < 2; retry++) { > Status = EcCommand(sc, EC_COMMAND_QUERY); > if (ACPI_SUCCESS(Status)) >@@ -657,7 +656,7 @@ EcGpeQueryHandler(void *Context) > EcUnlock(sc); > device_printf(sc->ec_dev, "GPE query failed: %s\n", > AcpiFormatException(Status)); >- return; >+ goto finish; > } > Data = EC_GET_DATA(sc); > >@@ -671,7 +670,7 @@ EcGpeQueryHandler(void *Context) > /* Ignore the value for "no outstanding event". (13.3.5) */ > CTR2(KTR_ACPI, "ec query ok,%s running _Q%02X", Data ? "" : " not", Data); > if (Data == 0) >- return; >+ goto finish; > > /* Evaluate _Qxx to respond to the controller. */ > snprintf(qxx, sizeof(qxx), "_Q%02X", Data); >@@ -682,13 +681,12 @@ EcGpeQueryHandler(void *Context) > qxx, AcpiFormatException(Status)); > } > >- /* Reenable runtime GPE if its execution was deferred. */ >- if (sci_enqueued) { >- Status = AcpiFinishGpe(sc->ec_gpehandle, sc->ec_gpebit); >- if (ACPI_FAILURE(Status)) >- device_printf(sc->ec_dev, "reenabling runtime GPE failed: %s\n", >- AcpiFormatException(Status)); >- } >+finish: >+ /* Reenable runtime GPE. */ >+ Status = AcpiFinishGpe(sc->ec_gpehandle, sc->ec_gpebit); >+ if (ACPI_FAILURE(Status)) >+ device_printf(sc->ec_dev, "reenabling runtime GPE failed: %s\n", >+ AcpiFormatException(Status)); > } > > /* >@@ -722,13 +720,12 @@ EcGpeHandler(ACPI_HANDLE GpeDevice, UINT32 GpeNumb > if ((EcStatus & EC_EVENT_SCI) && !sc->ec_sci_pend) { > CTR0(KTR_ACPI, "ec gpe queueing query handler"); > Status = AcpiOsExecute(OSL_GPE_HANDLER, EcGpeQueryHandler, Context); >- if (ACPI_SUCCESS(Status)) { >+ if (ACPI_SUCCESS(Status)) > sc->ec_sci_pend = TRUE; >- return (0); >- } else >+ else > printf("EcGpeHandler: queuing GPE query handler failed\n"); > } >- return (ACPI_REENABLE_GPE); >+ return (0); > } > > static ACPI_STATUS
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 162859
:
120111
|
149774
|
151870
| 151884