* Patch to fix asus_acpi on Samsung P30/P35
@ 2005-11-28 9:52 Hanno Böck
0 siblings, 0 replies; only message in thread
From: Hanno Böck @ 2005-11-28 9:52 UTC (permalink / raw)
To: linux-kernel; +Cc: torvalds, acpi-devel
[-- Attachment #1: Type: text/plain, Size: 1868 bytes --]
For a while now asus_acpi is broken on samsung laptops (causes oopses on
module loading and kernel panic if compiled into the kernel).
The attached Patch (by Christian Aichinger, so credits to him) fixes this.
Please apply this before 2.6.15.
Patch:
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)
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-11-28 9:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-28 9:52 Patch to fix asus_acpi on Samsung P30/P35 Hanno Böck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox