From: Sascha Sommer Subject: asus_acpi oops on samsung p35 Date: Mon, 21 Nov 2005 20:38:39 +0100 Message-ID: <200511212038.39593.saschasommer@freenet.de> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_/IigDTfK7UgWxca" Return-path: Sender: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-acpi@vger.kernel.org --Boundary-00=_/IigDTfK7UgWxca Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 --Boundary-00=_/IigDTfK7UgWxca Content-Type: text/x-diff; charset="us-ascii"; name="asus_acpi.c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="asus_acpi.c.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) --Boundary-00=_/IigDTfK7UgWxca-- ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click