summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2005-02-13 20:10:28 +0000
committernjl <njl@FreeBSD.org>2005-02-13 20:10:28 +0000
commitda6e7b2649dd92fa082e9a9256d4e3a4fff13580 (patch)
tree6483169fa9e9ea36143627fe8b4b92a812b1dc82
parent25c48f786735bd3ff1f2de5873cd4679785a9499 (diff)
downloadFreeBSD-src-da6e7b2649dd92fa082e9a9256d4e3a4fff13580.zip
FreeBSD-src-da6e7b2649dd92fa082e9a9256d4e3a4fff13580.tar.gz
Allow users to manually override quirks with the tunable "debug.acpi.quirks".
Suggested by: Jung-uk Kim
-rw-r--r--sys/dev/acpica/acpi.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index c1dbbe5..48f3cef 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) {
OpenPOWER on IntegriCloud