New acpi_ec.c
Ted Lindgreen
ted at tednet.nl
Wed Sep 26 02:26:30 PDT 2007
Hi,
The file /usr/src/sys/dev/acpica/acpi_ec.c has been updated recently.
This broke my patch (about which I have posted earlier this year
(around March) to let my Acer 3623 behave properly.
I append a new patch, which can be applied to the new acpi_ec.c.
To recap the problem and the hack that I found to fix it:
- It appears that the EC of my Acer 3623 does not like to be
polled for status to soon after writing a command to it.
- The error message AE_NO_HARDWARE_RESPONSE is output in enormous
amounts, and commands like apm(8) fail.
- With a delay of 2500 the amount of AE_NO_HARDWARE_RESPONSE messages
drops significantly, and apm(8) works.
- With a delay of 3000 no more AE_NO_HARDWARE_RESPONSE messages appear,
and everything works flawlessly.
regards,
-- ted
PS. the patch:
In /boot/loader.conf I have:
debug.acpi.ec.burst="1"
debug.acpi.ec.waitbeforepoll="3000"
and the change in acpi_ec.c:
--- acpi_ec.c 2007-09-26 11:18:27.000000000 +0200
+++ acpi_ec.c.org 2007-09-24 18:59:06.000000000 +0200
@@ -193,10 +193,6 @@
TUNABLE_INT("debug.acpi.ec.timeout", &ec_timeout);
SYSCTL_INT(_debug_acpi_ec, OID_AUTO, timeout, CTLFLAG_RW, &ec_timeout,
EC_TIMEOUT, "Total time spent waiting for a response (poll+sleep)");
-static int ec_waitbeforepoll = 0;
-TUNABLE_INT("debug.acpi.ec.waitbeforepoll", &ec_waitbeforepoll);
-SYSCTL_INT(_debug_acpi_ec, OID_AUTO, waitbeforepoll, CTLFLAG_RW, &ec_waitbeforepoll,
- 0, "Wait before starting to poll");
static ACPI_STATUS
EcLock(struct acpi_ec_softc *sc)
@@ -806,10 +802,6 @@
if (cold || rebooting || ec_polled_mode) {
static int once;
- /* Some EC's just need enough time before they can be polled */
- if (ec_waitbeforepoll > 0)
- AcpiOsStall(ec_waitbeforepoll);
- else {
if (EcCheckStatus(sc, "pre-check", Event) == AE_OK) {
if (!once) {
device_printf(sc->ec_dev,
@@ -818,7 +810,6 @@
}
AcpiOsStall(10);
}
- }
}
/* Wait for event by polling or GPE (interrupt). */
More information about the freebsd-current
mailing list