Add and document the hw.acpi.ec.poll_timeout tunable.

This commit is contained in:
Nate Lawson 2003-07-30 16:22:53 +00:00
parent 16a81ac7aa
commit a329ebca91
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118216
2 changed files with 9 additions and 5 deletions

View file

@ -309,9 +309,10 @@ the performance power profile.
.It Va hw.acpi.cpu.economy_speed
Sets the speed of the CPU, if it supports multiple speeds, while in
the economy power profile.
.It Va hw.acpi.ec.event_driven
Enables or disables the event driven model for the embedded controller
driver.
.It Va hw.acpi.ec.poll_timeout
Delay in milliseconds to wait for the EC to respond. Try increasing this
number if you get the error
.Er AE_NO_HARDWARE_RESPONSE .
.It Va hw.acpi.pci.link.%d.%d.%d.irq
Override the interrupt to use.
.It Va hw.acpi.verbose

View file

@ -288,6 +288,9 @@ struct acpi_ec_softc {
((event) == EC_EVENT_INPUT_BUFFER_EMPTY && \
((status) & EC_FLAG_INPUT_BUFFER) == 0))
static int ec_poll_timeout = EC_POLL_TIMEOUT;
TUNABLE_INT("hw.acpi.ec.poll_timeout", &ec_poll_timeout);
static __inline ACPI_STATUS
EcLock(struct acpi_ec_softc *sc)
{
@ -792,12 +795,12 @@ EcWaitEvent(struct acpi_ec_softc *sc, EC_EVENT Event)
sc->ec_polldelay = 100;
/*
* If we still don't have a response, wait up to EC_POLL_TIMEOUT ms
* If we still don't have a response, wait up to ec_poll_timeout ms
* for completion, sleeping for chunks of 10 ms.
*/
if (Status != AE_OK) {
retval = -1;
for (i = 0; i < EC_POLL_TIMEOUT / 10; i++) {
for (i = 0; i < ec_poll_timeout / 10; i++) {
if (retval != 0)
EcStatus = EC_GET_CSR(sc);
else