* Re: [patch 1/1] acpi: fix asus_acpi on Samsung P30/P35
[not found] ` <F7DC2337C7631D4386A2DF6E8FB22B30059658DB-N2PTB0HCzHKkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2006-01-04 16:37 ` Karol Kozimor
[not found] ` <20060104163729.GA6533-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Karol Kozimor @ 2006-01-04 16:37 UTC (permalink / raw)
To: Brown, Len
Cc: stable-DgEjT+Ai2ygdnm+yROfE0A, akpm-3NddpPZAyC0,
Greek0-hi6Y0CQ0nG0, linux-acpi-u79uwXL29TY76Z2rM5mHXA
Thus wrote Brown, Len:
> Due to necessary bug compatibility with MS, we're stuck with
> the implicit return workaround behaviour for the forseeable future.
I suppose so.
> acpi=struct exists so that OEMs can use Linux (and ACPICA)
> to test their BIOS. Linux should do the right thing with
> or without it -- but I would expect it to be enabled only in
> the test lab in practice.
>
> Note that in any case, acpi_strict is not intended to be
> changed at run-time -- for who knows what other workarounds
> other threads may be in the middle of when it might be changed...
That's exactly the reason I didn't push this concept further. Having a Big
ACPI Lock to accompany BKL is an interesting idea, but I doubt it would
catch on. OTOH, it would be nice to have 'my laptop boots with acpi=strict'
stickers to give out on trade shows. People would love it.
> The only question is what to do for 2.6.14/15 stable.
> A. apply this patch after it is tested in 2.6.16?
> B. wait for an update to replace this patch?
Ugh, 5 am is not exactly the best time to sound clear and concise. What I
meant was, in short:
1. The patch applied to acpi-test is sufficient for stable (i.e. 2.6.15.x).
2. I will provide another patch for acpi-test with my next batch of
updates. These will go into 2.6.16, .17 or whatever. Until this time,
however, the patch supplied stays at acpi-test.
Best regards,
--
Karol 'sziwan' Kozimor
sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [stable] Re: [patch 1/1] acpi: fix asus_acpi on Samsung P30/P35
[not found] ` <20060104163729.GA6533-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
@ 2006-01-05 1:47 ` Chris Wright
[not found] ` <20060105014707.GE3335-HBBaT/yk5SZXd/9EBkU14x2eb7JE58TQ@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Chris Wright @ 2006-01-05 1:47 UTC (permalink / raw)
To: Karol Kozimor
Cc: Brown, Len, linux-acpi-u79uwXL29TY76Z2rM5mHXA,
stable-DgEjT+Ai2ygdnm+yROfE0A, Greek0-hi6Y0CQ0nG0
* Karol Kozimor (sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org) wrote:
> Thus wrote Brown, Len:
> > The only question is what to do for 2.6.14/15 stable.
> > A. apply this patch after it is tested in 2.6.16?
> > B. wait for an update to replace this patch?
>
> Ugh, 5 am is not exactly the best time to sound clear and concise. What I
> meant was, in short:
> 1. The patch applied to acpi-test is sufficient for stable (i.e. 2.6.15.x).
> 2. I will provide another patch for acpi-test with my next batch of
> updates. These will go into 2.6.16, .17 or whatever. Until this time,
> however, the patch supplied stays at acpi-test.
Any reason not to push the current one up, instead of keeping an interim
patch that is in stable and acpi-test, but nowhere else? For -stable we
prefer things that are upstream (i.e. reasonably well-tested).
thanks,
-chris
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [stable] Re: [patch 1/1] acpi: fix asus_acpi on Samsung P30/P35
@ 2006-01-05 3:27 Brown, Len
[not found] ` <F7DC2337C7631D4386A2DF6E8FB22B300599D0BA-N2PTB0HCzHKkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Brown, Len @ 2006-01-05 3:27 UTC (permalink / raw)
To: Chris Wright, Karol Kozimor
Cc: linux-acpi-u79uwXL29TY76Z2rM5mHXA, stable-DgEjT+Ai2ygdnm+yROfE0A,
Greek0-hi6Y0CQ0nG0
>Any reason not to push the current one up, instead of keeping
>an interim patch that is in stable and acpi-test, but nowhere else?
>For -stable we prefer things that are upstream (i.e. reasonably well-tested).
No reason except that I'm waiting for an -mm iteration
before we pushing anything to 2.6.16. It has been 3 weeks
since -mm shipped, so a lot has changed besides this
and I'd like to see it all survive -mm before pushing to linus.
thanks,
-Len
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [stable] Re: [patch 1/1] acpi: fix asus_acpi on Samsung P30/P35
[not found] ` <F7DC2337C7631D4386A2DF6E8FB22B300599D0BA-N2PTB0HCzHKkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2006-01-05 5:10 ` Chris Wright
0 siblings, 0 replies; 5+ messages in thread
From: Chris Wright @ 2006-01-05 5:10 UTC (permalink / raw)
To: Brown, Len
Cc: Chris Wright, Karol Kozimor, linux-acpi-u79uwXL29TY76Z2rM5mHXA,
stable-DgEjT+Ai2ygdnm+yROfE0A, Greek0-hi6Y0CQ0nG0
* Brown, Len (len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org) wrote:
> No reason except that I'm waiting for an -mm iteration
> before we pushing anything to 2.6.16. It has been 3 weeks
> since -mm shipped, so a lot has changed besides this
> and I'd like to see it all survive -mm before pushing to linus.
Sounds good, we can just wait for your cycle.
thanks,
-chris
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [stable] Re: [patch 1/1] acpi: fix asus_acpi on Samsung P30/P35
[not found] ` <20060105014707.GE3335-HBBaT/yk5SZXd/9EBkU14x2eb7JE58TQ@public.gmane.org>
@ 2006-01-15 1:42 ` Karol Kozimor
0 siblings, 0 replies; 5+ messages in thread
From: Karol Kozimor @ 2006-01-15 1:42 UTC (permalink / raw)
To: Chris Wright
Cc: Brown, Len, linux-acpi-u79uwXL29TY76Z2rM5mHXA,
stable-DgEjT+Ai2ygdnm+yROfE0A, Greek0-hi6Y0CQ0nG0
Thus wrote Chris Wright:
> > > The only question is what to do for 2.6.14/15 stable.
> > > A. apply this patch after it is tested in 2.6.16?
> > > B. wait for an update to replace this patch?
> > Ugh, 5 am is not exactly the best time to sound clear and concise. What I
> > meant was, in short:
> > 1. The patch applied to acpi-test is sufficient for stable (i.e. 2.6.15.x).
> > 2. I will provide another patch for acpi-test with my next batch of
> > updates. These will go into 2.6.16, .17 or whatever. Until this time,
> > however, the patch supplied stays at acpi-test.
> Any reason not to push the current one up, instead of keeping an interim
> patch that is in stable and acpi-test, but nowhere else? For -stable we
> prefer things that are upstream (i.e. reasonably well-tested).
Because:
1. Prior to this day, the patch didn't exist,
2. The new patch has absolutely no functional advantage over the old one
(i.e. the one Len applied to acpi-test) except for making new model
support easier (and I believe new model support is not the right place
for -stable) and the code slightly more robust,
3. The patch involves moving some code around (the diff is ugly) and is, in
comparison to the old one, non-trivial.
Anyway, I'm inlining the new patch, not for inclusion (it will only apply
against acpi4asus CVS anyway), but just for you to see how it's gonna look
like. If you still prefer this one over the other, I'll rebase it against
2.6.15.
--
Karol 'sziwan' Kozimor
sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org
Index: asus_core.c
===================================================================
RCS file: /cvsroot/acpi4asus/acpi4asus/driver/asus_core.c,v
retrieving revision 1.119
diff -u -r1.119 asus_core.c
--- asus_core.c 11 Jan 2006 00:01:30 -0000 1.119
+++ asus_core.c 15 Jan 2006 00:00:30 -0000
@@ -1043,6 +1043,69 @@
}
/*
+ * Match the model string to the list of supported models. Return END_MODEL if
+ * no match or model is NULL.
+ */
+static int __init asus_model_match(char *model)
+{
+ if (model == NULL)
+ return END_MODEL;
+
+ if (strncmp(model, "L3D", 3) == 0)
+ return L3D;
+ else if (strncmp(model, "L2E", 3) == 0 ||
+ strncmp(model, "L3H", 3) == 0 ||
+ strncmp(model, "L5D", 3) == 0)
+ return L3H;
+ else if (strncmp(model, "L3", 2) == 0 ||
+ strncmp(model, "L2B", 3) == 0)
+ return L3C;
+ else if (strncmp(model, "L8L", 3) == 0)
+ return L8L;
+ else if (strncmp(model, "L4R", 3) == 0)
+ return L4R;
+ else if (strncmp(model, "M6N", 3) == 0 ||
+ strncmp(model, "W3N", 3) == 0)
+ return M6N;
+ else if (strncmp(model, "M6R", 3) == 0 ||
+ strncmp(model, "A3G", 3) == 0)
+ return M6R;
+ else if (strncmp(model, "M2N", 3) == 0 ||
+ strncmp(model, "M3N", 3) == 0 ||
+ strncmp(model, "M5N", 3) == 0 ||
+ strncmp(model, "M6N", 3) == 0 ||
+ strncmp(model, "S1N", 3) == 0 ||
+ strncmp(model, "S5N", 3) == 0 ||
+ strncmp(model, "W1N", 3) == 0)
+ return xxN;
+ else if (strncmp(model, "M1", 2) == 0)
+ return M1A;
+ else if (strncmp(model, "M2", 2) == 0 ||
+ strncmp(model, "L4E", 3) == 0)
+ return M2E;
+ else if (strncmp(model, "L2", 2) == 0)
+ return L2D;
+ else if (strncmp(model, "L8", 2) == 0)
+ return S1x;
+ else if (strncmp(model, "D1", 2) == 0)
+ return D1x;
+ else if (strncmp(model, "A1", 2) == 0)
+ return A1x;
+ else if (strncmp(model, "A2", 2) == 0)
+ return A2x;
+ else if (strncmp(model, "J1", 2) == 0)
+ return S2x;
+ else if (strncmp(model, "L5", 2) == 0)
+ return L5x;
+ else if (strncmp(model, "A4G", 3) == 0)
+ return A4G;
+ else if (strncmp(model, "W5A", 3) == 0)
+ return W5A;
+ else
+ return END_MODEL;
+}
+
+/*
* This function is used to initialize the hotk with right values. In this
* method, we can make all the detection we want, and modify the hotk struct
*/
@@ -1052,6 +1115,7 @@
struct acpi_buffer dsdt = { ACPI_ALLOCATE_BUFFER, NULL };
union acpi_object *model = NULL;
int bsts_result;
+ char *string = NULL;
acpi_status status;
/*
@@ -1080,110 +1144,65 @@
else if (bsts_result)
printk(KERN_NOTICE " BSTS called, 0x%02x returned\n", bsts_result);
- if (buffer.pointer == NULL)
- return -EINVAL;
- model = (union acpi_object *) buffer.pointer;
-
- /* Samsung P30 has a device with a valid _HID whose INIT does not
- * return anything. Catch this one and any similar here */
- if (model->type == ACPI_TYPE_STRING) {
- printk(KERN_NOTICE " %s model detected, ", model->string.pointer);
- } else {
- if (asus_info && /* Samsung P30 */
+ /*
+ * Try to match the object returned by INIT to the specific model.
+ * Handle every possible object (or the lack of thereof) the DSDT
+ * writers might throw at us. When in trouble, we pass NULL to
+ * asus_model_match() and try something completely different.
+ */
+ if (buffer.pointer) {
+ model = (union acpi_object *) buffer.pointer;
+ switch (model->type) {
+ case ACPI_TYPE_STRING:
+ string = model->string.pointer;
+ break;
+ case ACPI_TYPE_BUFFER:
+ string = model->buffer.pointer;
+ break;
+ default:
+ acpi_os_free(model);
+ break;
+ }
+ }
+ hotk->model = asus_model_match(string);
+ if (hotk->model == END_MODEL) { /* match failed */
+ if (asus_info &&
strncmp(asus_info->oem_table_id, "ODEM", 4) == 0) {
hotk->model = P30;
- printk(KERN_NOTICE " Samsung P30 detected, supported\n");
+ printk(KERN_NOTICE
+ " Samsung P30 detected, supported\n");
} else {
hotk->model = M2E;
- printk(KERN_WARNING " no string returned by INIT\n");
- printk(KERN_WARNING " trying default values, supply "
- "the developers with your DSDT\n");
+ printk(KERN_NOTICE " unsupported model %s, trying "
+ "default values\n", string);
+ printk(KERN_NOTICE
+ " send /proc/acpi/dsdt to the developers\n");
}
hotk->methods = &model_conf[hotk->model];
return AE_OK;
}
-
- hotk->model = END_MODEL;
- if (strncmp(model->string.pointer, "L3D", 3) == 0)
- hotk->model = L3D;
- else if (strncmp(model->string.pointer, "L2E", 3) == 0 ||
- strncmp(model->string.pointer, "L3H", 3) == 0 ||
- strncmp(model->string.pointer, "L5D", 3) == 0)
- hotk->model = L3H;
- else if (strncmp(model->string.pointer, "L3", 2) == 0 ||
- strncmp(model->string.pointer, "L2B", 3) == 0)
- hotk->model = L3C;
- else if (strncmp(model->string.pointer, "L8L", 3) == 0)
- hotk->model = L8L;
- else if (strncmp(model->string.pointer, "L4R", 3) == 0)
- hotk->model = L4R;
- else if (strncmp(model->string.pointer, "M6N", 3) == 0 ||
- strncmp(model->string.pointer, "W3N", 3) == 0)
- hotk->model = M6N;
- else if (strncmp(model->string.pointer, "M6R", 3) == 0 ||
- strncmp(model->string.pointer, "A3G", 3) == 0)
- hotk->model = M6R;
- else if (strncmp(model->string.pointer, "M2N", 3) == 0 ||
- strncmp(model->string.pointer, "M3N", 3) == 0 ||
- strncmp(model->string.pointer, "M5N", 3) == 0 ||
- strncmp(model->string.pointer, "M6N", 3) == 0 ||
- strncmp(model->string.pointer, "S1N", 3) == 0 ||
- strncmp(model->string.pointer, "S5N", 3) == 0 ||
- strncmp(model->string.pointer, "W1N", 3) == 0)
- hotk->model = xxN;
- else if (strncmp(model->string.pointer, "M1", 2) == 0)
- hotk->model = M1A;
- else if (strncmp(model->string.pointer, "M2", 2) == 0 ||
- strncmp(model->string.pointer, "L4E", 3) == 0)
- hotk->model = M2E;
- else if (strncmp(model->string.pointer, "L2", 2) == 0)
- hotk->model = L2D;
- else if (strncmp(model->string.pointer, "L8", 2) == 0)
- hotk->model = S1x;
- else if (strncmp(model->string.pointer, "D1", 2) == 0)
- hotk->model = D1x;
- else if (strncmp(model->string.pointer, "A1", 2) == 0)
- hotk->model = A1x;
- else if (strncmp(model->string.pointer, "A2", 2) == 0)
- hotk->model = A2x;
- else if (strncmp(model->string.pointer, "J1", 2) == 0)
- hotk->model = S2x;
- else if (strncmp(model->string.pointer, "L5", 2) == 0)
- hotk->model = L5x;
- else if (strncmp(model->string.pointer, "A4G", 3) == 0)
- hotk->model = A4G;
- else if (strncmp(model->string.pointer, "W5A", 3) == 0)
- hotk->model = W5A;
-
- if (hotk->model == END_MODEL) {
- printk("unsupported, trying default values, supply the "
- "developers with your DSDT\n");
- hotk->model = M2E;
- } else {
- printk("supported\n");
- }
-
hotk->methods = &model_conf[hotk->model];
+ printk(KERN_NOTICE " %s model detected, supported\n", string);
/* Sort of per-model blacklist */
- if (strncmp(model->string.pointer, "L2B", 3) == 0)
+ if (strncmp(string, "L2B", 3) == 0)
hotk->methods->lcd_status = NULL;
/* L2B is similar enough to L3C to use its settings, with this only
exception */
- else if (strncmp(model->string.pointer, "A3G", 3) == 0)
+ else if (strncmp(string, "A3G", 3) == 0)
hotk->methods->lcd_status = "\\BLFG";
/* A3G is like M6R */
- else if (strncmp(model->string.pointer, "S5N", 3) == 0 ||
- strncmp(model->string.pointer, "M5N", 3) == 0 ||
- strncmp(model->string.pointer, "W3N", 3) == 0)
+ else if (strncmp(string, "S5N", 3) == 0 ||
+ strncmp(string, "M5N", 3) == 0 ||
+ strncmp(string, "W3N", 3) == 0)
hotk->methods->mt_mled = NULL;
/* S5N and M5N have no MLED */
- else if (strncmp(model->string.pointer, "L5D", 3) == 0)
+ else if (strncmp(string, "L5D", 3) == 0)
hotk->methods->mt_wled = NULL;
/* L5D's WLED is not controlled by ACPI */
- else if (strncmp(model->string.pointer, "M2N", 3) == 0)
+ else if (strncmp(string, "M2N", 3) == 0)
hotk->methods->mt_wled = "WLED";
- else if (strncmp(model->string.pointer, "W1N", 3) == 0) {
+ else if (strncmp(string, "W1N", 3) == 0) {
hotk->methods->mt_wled = "WLED";
hotk->methods->mt_ledd = "SLCM";
}
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-01-15 1:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <F7DC2337C7631D4386A2DF6E8FB22B30059658DB@hdsmsx401.amr.corp.intel.com>
[not found] ` <F7DC2337C7631D4386A2DF6E8FB22B30059658DB-N2PTB0HCzHKkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2006-01-04 16:37 ` [patch 1/1] acpi: fix asus_acpi on Samsung P30/P35 Karol Kozimor
[not found] ` <20060104163729.GA6533-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
2006-01-05 1:47 ` [stable] " Chris Wright
[not found] ` <20060105014707.GE3335-HBBaT/yk5SZXd/9EBkU14x2eb7JE58TQ@public.gmane.org>
2006-01-15 1:42 ` Karol Kozimor
2006-01-05 3:27 Brown, Len
[not found] ` <F7DC2337C7631D4386A2DF6E8FB22B300599D0BA-N2PTB0HCzHKkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2006-01-05 5:10 ` Chris Wright
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox