From da6e7b2649dd92fa082e9a9256d4e3a4fff13580 Mon Sep 17 00:00:00 2001 From: njl Date: Sun, 13 Feb 2005 20:10:28 +0000 Subject: [PATCH] Allow users to manually override quirks with the tunable "debug.acpi.quirks". Suggested by: Jung-uk Kim --- sys/dev/acpica/acpi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index c1dbbe5a3e53..48f3cef115e5 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -235,6 +235,9 @@ TUNABLE_INT("debug.acpi.do_powerstate", &acpi_do_powerstate); SYSCTL_INT(_debug_acpi, OID_AUTO, do_powerstate, CTLFLAG_RW, &acpi_do_powerstate, 1, "Turn off devices when suspending."); +/* Allow users to override quirks. */ +TUNABLE_INT("debug.acpi.quirks", &acpi_quirks); + /* * ACPI can only be loaded as a module by the loader; activating it after * system bootstrap time is not useful, and can be fatal to the system. @@ -300,9 +303,10 @@ acpi_Startup(void) } /* Set up any quirks we have for this system. */ - acpi_table_quirks(&acpi_quirks); + if (acpi_quirks == 0) + acpi_table_quirks(&acpi_quirks); - /* If the user manually set the disabled hint to 0, override any quirk. */ + /* If the user manually set the disabled hint to 0, force-enable ACPI. */ if (resource_int_value("acpi", 0, "disabled", &val) == 0 && val == 0) acpi_quirks &= ~ACPI_Q_BROKEN; if (acpi_quirks & ACPI_Q_BROKEN) {