summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_ec.c
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2003-07-25 16:49:46 +0000
committernjl <njl@FreeBSD.org>2003-07-25 16:49:46 +0000
commitf1e9b6d47643df3fef25b87859e401441c1bab7e (patch)
treedcc936d067d25a6165a4d37aa9a33de7023a7be1 /sys/dev/acpica/acpi_ec.c
parentea9b26bc94ee4b76cecbc4dd120898f7adeffb54 (diff)
downloadFreeBSD-src-f1e9b6d47643df3fef25b87859e401441c1bab7e.zip
FreeBSD-src-f1e9b6d47643df3fef25b87859e401441c1bab7e.tar.gz
Add an informational debugging printf of the maximum time spent in
EcEventWait(). If you get AE_HARDWARE_NO_RESPONSE errors, please enable this info by setting hw.acpi.verbose=1 in loader.conf.
Diffstat (limited to 'sys/dev/acpica/acpi_ec.c')
-rw-r--r--sys/dev/acpica/acpi_ec.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi_ec.c b/sys/dev/acpica/acpi_ec.c
index c09fb0b..e6ce1bc 100644
--- a/sys/dev/acpica/acpi_ec.c
+++ b/sys/dev/acpica/acpi_ec.c
@@ -754,6 +754,7 @@ EcWaitEvent(struct acpi_ec_softc *sc, EC_EVENT Event)
EC_STATUS EcStatus;
ACPI_STATUS Status;
int i, period, retval;
+ static int EcDbgMaxDelay;
mtx_assert(&sc->ec_mtx, MA_OWNED);
Status = AE_NO_HARDWARE_RESPONSE;
@@ -810,6 +811,15 @@ EcWaitEvent(struct acpi_ec_softc *sc, EC_EVENT Event)
}
}
+ /* Calculate new delay and print it if it exceeds the max. */
+ if (period == 1000)
+ period += i * 10000;
+ if (period > EcDbgMaxDelay) {
+ EcDbgMaxDelay = period;
+ ACPI_VPRINT(sc->ec_dev, acpi_device_get_parent_softc(sc->ec_dev),
+ "info: new max delay is %d us\n", period);
+ }
+
return (Status);
}
OpenPOWER on IntegriCloud