summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_ec.c
diff options
context:
space:
mode:
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