summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPaul Irofti <pirofti@cvs.openbsd.org>2012-07-13 11:51:42 +0000
committerPaul Irofti <pirofti@cvs.openbsd.org>2012-07-13 11:51:42 +0000
commitf2eeda3c7c3c63c21432abb225e9d36773e89121 (patch)
treee772dc93e7cdb9d48567069dbfb4acfbdaa4a6fe /sys
parentb3959feb902204ecbc1e8fc0d53138d21c8d4f33 (diff)
Disable acpivideo(4) on ASUS laptops.
There are some models that panic whenever an event is received. Some cope, some don't. In order to get this right acpiec(4) requires major rework. Until then let machines boot. Discussed with deraadt@.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/acpi/acpi.c11
-rw-r--r--sys/dev/acpi/acpireg.h3
2 files changed, 9 insertions, 5 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c
index 94ab0f67133..132d18c9ca8 100644
--- a/sys/dev/acpi/acpi.c
+++ b/sys/dev/acpi/acpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi.c,v 1.237 2012/07/11 10:57:38 mlarkin Exp $ */
+/* $OpenBSD: acpi.c,v 1.238 2012/07/13 11:51:41 pirofti Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
@@ -99,6 +99,7 @@ void acpi_pbtn_task(void *, int);
int acpi_thinkpad_enabled;
int acpi_toshiba_enabled;
+int acpi_asus_enabled;
int acpi_saved_spl;
int acpi_saved_boothowto;
int acpi_enabled;
@@ -792,7 +793,8 @@ acpi_attach(struct device *parent, struct device *self, void *aux)
aml_find_node(&aml_root, "GBRT", acpi_foundsony, sc);
/* attach video only if this is not a stinkpad or toshiba */
- if (!acpi_thinkpad_enabled && !acpi_toshiba_enabled)
+ if (!acpi_thinkpad_enabled && !acpi_toshiba_enabled &&
+ !acpi_asus_enabled)
aml_find_node(&aml_root, "_DOS", acpi_foundvideo, sc);
/* create list of devices we want to query when APM come in */
@@ -2330,9 +2332,10 @@ acpi_foundhid(struct aml_node *node, void *arg)
!strcmp(dev, ACPI_DEV_PBD) ||
!strcmp(dev, ACPI_DEV_SBD))
aaa.aaa_name = "acpibtn";
- else if (!strcmp(dev, ACPI_DEV_ASUS))
+ else if (!strcmp(dev, ACPI_DEV_ASUS) || !strcmp(dev, ACPI_DEV_ASUS1)) {
aaa.aaa_name = "acpiasus";
- else if (!strcmp(dev, ACPI_DEV_IBM) ||
+ acpi_asus_enabled = 1;
+ } else if (!strcmp(dev, ACPI_DEV_IBM) ||
!strcmp(dev, ACPI_DEV_LENOVO)) {
aaa.aaa_name = "acpithinkpad";
acpi_thinkpad_enabled = 1;
diff --git a/sys/dev/acpi/acpireg.h b/sys/dev/acpi/acpireg.h
index e70ea37d5d2..ebc2edaa169 100644
--- a/sys/dev/acpi/acpireg.h
+++ b/sys/dev/acpi/acpireg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpireg.h,v 1.27 2012/01/07 20:13:17 kettenis Exp $ */
+/* $OpenBSD: acpireg.h,v 1.28 2012/07/13 11:51:41 pirofti Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
@@ -735,6 +735,7 @@ struct acpi_ivrs {
#define ACPI_DEV_THZ "THERMALZONE" /* Thermal Zone */
#define ACPI_DEV_FFB "FIXEDBUTTON" /* Fixed Feature Button */
#define ACPI_DEV_ASUS "ASUS010" /* ASUS Hotkeys */
+#define ACPI_DEV_ASUS1 "ATK0100" /* ASUS Special Device */
#define ACPI_DEV_IBM "IBM0068" /* IBM ThinkPad support */
#define ACPI_DEV_LENOVO "LEN0068" /* Lenovo ThinkPad support */
#define ACPI_DEV_ASUSAIBOOSTER "ATK0110" /* ASUSTeK AI Booster */