public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* asus_acpi oops on samsung p35
@ 2005-11-21 19:38 Sascha Sommer
       [not found] ` <200511212038.39593.saschasommer-KuiJ5kEpwI6ELgA04lAiVw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Sascha Sommer @ 2005-11-21 19:38 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

[-- Attachment #1: Type: text/plain, Size: 421 bytes --]

Hi,

as the oops, reported for example in 
http://sourceforge.net/mailarchive/message.php?msg_id=11977633,
is still occuring on recent kernels it would be nice if someone could review 
the attached patch from Christian Aichinger posted to this list in
http://sourceforge.net/mailarchive/message.php?msg_id=13057151
so the remaining issues can be fixed.
It is working fine with my Samsung p35.


Thanks in advance

Sascha

[-- Attachment #2: asus_acpi.c.patch --]
[-- Type: text/x-diff, Size: 1548 bytes --]

diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c
--- a/drivers/acpi/asus_acpi.c
+++ b/drivers/acpi/asus_acpi.c
@@ -1006,6 +1006,24 @@ static int __init asus_hotk_get_info(voi
 	}
 
 	model = (union acpi_object *)buffer.pointer;
+
+	/* INIT on Samsung's P35 returns an integer, possible return
+	 * values are tested below */
+	if (model->type == ACPI_TYPE_INTEGER) {
+		if (model->integer.value == -1 ||
+			model->integer.value == 0x58 ||
+			model->integer.value == 0x38) {
+			hotk->model = P30;
+			printk(KERN_NOTICE
+				       "  Samsung P35 detected, supported\n");
+			goto out_known;
+		} else {
+			printk(KERN_WARNING 
+				"  unknown integer returned by INIT\n");
+			goto out_unknown;
+		}
+	}
+
 	if (model->type == ACPI_TYPE_STRING) {
 		printk(KERN_NOTICE "  %s model detected, ",
 		       model->string.pointer);
@@ -1057,9 +1075,7 @@ static int __init asus_hotk_get_info(voi
 		hotk->model = L5x;
 
 	if (hotk->model == END_MODEL) {
-		printk("unsupported, trying default values, supply the "
-		       "developers with your DSDT\n");
-		hotk->model = M2E;
+		goto out_unknown;
 	} else {
 		printk("supported\n");
 	}
@@ -1088,6 +1104,15 @@ static int __init asus_hotk_get_info(voi
 	acpi_os_free(model);
 
 	return AE_OK;
+
+out_unknown:
+	printk(KERN_WARNING "  unsupported, trying default values, "
+			"supply the developers with your DSDT\n");
+	hotk->model = M2E;
+out_known:
+	hotk->methods = &model_conf[hotk->model];
+	acpi_os_free(model);
+	return AE_OK;
 }
 
 static int __init asus_hotk_check(void)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-11-29  9:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-21 19:38 asus_acpi oops on samsung p35 Sascha Sommer
     [not found] ` <200511212038.39593.saschasommer-KuiJ5kEpwI6ELgA04lAiVw@public.gmane.org>
2005-11-25  6:43   ` Yu, Luming
     [not found]     ` <200511251443.19125.luming.yu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2005-11-26 11:25       ` Sascha Sommer
2005-11-29  9:09       ` Timo Hoenig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox