--- sys/dev/acpica/acpi_ec.c.orig 2009-12-16 03:21:36.283295223 +0000 +++ sys/dev/acpica/acpi_ec.c 2009-12-16 03:38:44.410426185 +0000 @@ -197,6 +197,10 @@ 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_disable_polling; +SYSCTL_INT(_debug_acpi_ec, OID_AUTO, disable_polling, CTLFLAG_RW, &ec_disable_polling, 0, + "Totally disable use of polled mode (Dell EC problem workaround)"); + static ACPI_STATUS EcLock(struct acpi_ec_softc *sc) { @@ -577,7 +581,9 @@ /* Disable the GPE so we don't get EC events during shutdown. */ sc = device_get_softc(dev); - AcpiDisableGpe(sc->ec_gpehandle, sc->ec_gpebit, ACPI_NOT_ISR); + if (!ec_disable_polling){ + AcpiDisableGpe(sc->ec_gpehandle,sc->ec_gpebit,ACPI_NOT_ISR); + } return (0); } @@ -814,7 +820,7 @@ ACPI_SERIAL_ASSERT(ec); Status = AE_NO_HARDWARE_RESPONSE; - int need_poll = cold || rebooting || ec_polled_mode || sc->ec_suspending; + int need_poll = ( cold || rebooting || ec_polled_mode || sc->ec_suspending ) && !ec_disable_polling; /* * The main CPU should be much faster than the EC. So the status should * be "not ready" when we start waiting. But if the main CPU is really @@ -894,7 +900,11 @@ device_printf(sc->ec_dev, "wait timed out (%sresponse), forcing polled mode\n", Status == AE_OK ? "" : "no "); + if (ec_disable_polling) { + device_printf(sc->ec_dev,"Polling explicitily disabled! Continue waiting for generated GPEs...\n"); + } else { ec_polled_mode = TRUE; + } } } if (Status != AE_OK)