diff options
author | njl <njl@FreeBSD.org> | 2004-06-05 07:25:58 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2004-06-05 07:25:58 +0000 |
commit | bc0434bbb2d87832e7f6330bb260c1329b1f7e1f (patch) | |
tree | c60466b13e20c7f7b8985de7660c090b3b8468ea /sys/dev | |
parent | ed0911a65e99053de545627192b704b7769c2a53 (diff) | |
download | FreeBSD-src-bc0434bbb2d87832e7f6330bb260c1329b1f7e1f.zip FreeBSD-src-bc0434bbb2d87832e7f6330bb260c1329b1f7e1f.tar.gz |
Disable wake GPEs in the reboot path as well as poweroff path. This fixes
"stray irq 9" messages on my Thinkpad. It may also help with general
reboot consistency although the recent hang on reboot was solved by
acpi_cpu.c rev 1.39.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/acpica/acpi.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 0bebf28..7b35d63 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -102,6 +102,7 @@ static int acpi_modevent(struct module *mod, int event, void *junk); static void acpi_identify(driver_t *driver, device_t parent); static int acpi_probe(device_t dev); static int acpi_attach(device_t dev); +static int acpi_shutdown(device_t dev); static void acpi_quirks_set(void); static device_t acpi_add_child(device_t bus, int order, const char *name, int unit); @@ -151,8 +152,8 @@ static device_method_t acpi_methods[] = { DEVMETHOD(device_identify, acpi_identify), DEVMETHOD(device_probe, acpi_probe), DEVMETHOD(device_attach, acpi_attach), + DEVMETHOD(device_shutdown, acpi_shutdown), DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, bus_generic_suspend), DEVMETHOD(device_resume, bus_generic_resume), @@ -612,6 +613,15 @@ acpi_attach(device_t dev) return_VALUE (error); } +static int +acpi_shutdown(device_t dev) +{ + + /* Disable all wake GPEs not appropriate for reboot/poweroff. */ + acpi_wake_limit_walk(ACPI_STATE_S5); + return (0); +} + static void acpi_quirks_set() { @@ -1153,9 +1163,6 @@ acpi_shutdown_pre_sync(void *arg, int howto) ACPI_ASSERTLOCK; - /* Disable all wake GPEs not appropriate for this state. */ - acpi_wake_limit_walk(ACPI_STATE_S5); - /* * Disable all ACPI events before soft off, otherwise the system * will be turned on again on some laptops. |