public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* acer-wmi broken in latest git kernel on TravelMate 6492 (Insufficient arguments - method [WQAA])
@ 2008-08-02 15:50 Sven Wegener
  2008-08-02 16:28 ` Carlos Corbacho
  0 siblings, 1 reply; 5+ messages in thread
From: Sven Wegener @ 2008-08-02 15:50 UTC (permalink / raw)
  To: Carlos Corbacho; +Cc: Bob Moore, Andi Kleen, Lin Ming, linux-acpi, linux-kernel

Hi all,

running Linus' latest (2b12a4c) git kernel, acer-wmi triggers the 
following ACPI Error on my Acer TravelMate 6492:

acer-wmi: Acer Laptop ACPI-WMI Extras
ACPI Error (nseval-0159): Insufficient arguments - method [WQAA] needs 1, found 0 [20080609]
acer-wmi: Unable to detect available WMID devices

Reverting commit f3454ae8104efb2dbf0d08ec42c6f5d0fe9225bc (ACPICA: Add 
argument count checking to control method invocation via 
acpi_evaluate_object) makes acer_wmi work as before.

Doing a little debugging the call trace starting at acer_wmi_init() is:

WMID_set_capabilities() (called from drivers/misc/acer-wmi.c:1192)
wmi_query_block(WMID_GUID2, 1, &out) (called from drivers/misc/acer-wmi.c:747)
acpi_evaluate_object(handle, method, NULL, out) (called from drivers/acpi/wmi.c:350)
acpi_ns_evaluate(info) (called from drivers/acpi/namespace/nsxfeval.c:258)

Is it a bug in acer-wmi or in Acer's ACPI implementation? I can provide 
more information as necessary.

Sven

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

* Re: acer-wmi broken in latest git kernel on TravelMate 6492 (Insufficient arguments - method [WQAA])
  2008-08-02 15:50 acer-wmi broken in latest git kernel on TravelMate 6492 (Insufficient arguments - method [WQAA]) Sven Wegener
@ 2008-08-02 16:28 ` Carlos Corbacho
  2008-08-02 17:01   ` Sven Wegener
  2008-08-27 13:54   ` Matthew Garrett
  0 siblings, 2 replies; 5+ messages in thread
From: Carlos Corbacho @ 2008-08-02 16:28 UTC (permalink / raw)
  To: Sven Wegener; +Cc: Bob Moore, Andi Kleen, Lin Ming, linux-acpi, linux-kernel

On Saturday 02 August 2008 16:50:54 Sven Wegener wrote:
> Is it a bug in acer-wmi or in Acer's ACPI implementation? I can provide 
> more information as necessary.

Neither - it's a bug in wmi.c

Try the following patch:
---
ACPI: WMI: Set instance for query block calls

From: Carlos Corbacho <carlos@strangeworlds.co.uk>

Although the necessary data structure was set up, it was never actually
passed in, so data block calls have only been working by sheer chance.

(On Acer laptops. the data block methods we've been calling never look at
the instance value, hence acer-wmi never triggered this before).

f3454ae8104efb2dbf0d08ec42c6f5d0fe9225bc brought this to light.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
---

 drivers/acpi/wmi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/drivers/acpi/wmi.c b/drivers/acpi/wmi.c
index c33b1c6..cfe2c83 100644
--- a/drivers/acpi/wmi.c
+++ b/drivers/acpi/wmi.c
@@ -347,7 +347,7 @@ struct acpi_buffer *out)
 	strcpy(method, "WQ");
 	strncat(method, block->object_id, 2);
 
-	status = acpi_evaluate_object(handle, method, NULL, out);
+	status = acpi_evaluate_object(handle, method, &input, out);
 
 	/*
 	 * If ACPI_WMI_EXPENSIVE, call the relevant WCxx method, even if

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

* Re: acer-wmi broken in latest git kernel on TravelMate 6492 (Insufficient arguments - method [WQAA])
  2008-08-02 16:28 ` Carlos Corbacho
@ 2008-08-02 17:01   ` Sven Wegener
  2008-08-27 13:54   ` Matthew Garrett
  1 sibling, 0 replies; 5+ messages in thread
From: Sven Wegener @ 2008-08-02 17:01 UTC (permalink / raw)
  To: Carlos Corbacho; +Cc: Bob Moore, Andi Kleen, Lin Ming, linux-acpi, linux-kernel

On Sat, 2 Aug 2008, Carlos Corbacho wrote:

> On Saturday 02 August 2008 16:50:54 Sven Wegener wrote:
> > Is it a bug in acer-wmi or in Acer's ACPI implementation? I can provide 
> > more information as necessary.
> 
> Neither - it's a bug in wmi.c
> 
> Try the following patch:
> ---
> ACPI: WMI: Set instance for query block calls
> 
> From: Carlos Corbacho <carlos@strangeworlds.co.uk>
> 
> Although the necessary data structure was set up, it was never actually
> passed in, so data block calls have only been working by sheer chance.
> 
> (On Acer laptops. the data block methods we've been calling never look at
> the instance value, hence acer-wmi never triggered this before).
> 
> f3454ae8104efb2dbf0d08ec42c6f5d0fe9225bc brought this to light.
> 
> Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>

Yep, that fixes it, thanks.

Tested-by: Sven Wegener <sven.wegener@stealer.net>

> diff --git a/drivers/acpi/wmi.c b/drivers/acpi/wmi.c
> index c33b1c6..cfe2c83 100644
> --- a/drivers/acpi/wmi.c
> +++ b/drivers/acpi/wmi.c
> @@ -347,7 +347,7 @@ struct acpi_buffer *out)
>  	strcpy(method, "WQ");
>  	strncat(method, block->object_id, 2);
>  
> -	status = acpi_evaluate_object(handle, method, NULL, out);
> +	status = acpi_evaluate_object(handle, method, &input, out);
>  
>  	/*
>  	 * If ACPI_WMI_EXPENSIVE, call the relevant WCxx method, even if

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

* Re: acer-wmi broken in latest git kernel on TravelMate 6492 (Insufficient arguments - method [WQAA])
  2008-08-02 16:28 ` Carlos Corbacho
  2008-08-02 17:01   ` Sven Wegener
@ 2008-08-27 13:54   ` Matthew Garrett
  2008-08-27 14:24     ` Sven Wegener
  1 sibling, 1 reply; 5+ messages in thread
From: Matthew Garrett @ 2008-08-27 13:54 UTC (permalink / raw)
  To: Carlos Corbacho
  Cc: Sven Wegener, Bob Moore, Andi Kleen, Lin Ming, linux-acpi,
	linux-kernel

On Sat, Aug 02, 2008 at 05:28:45PM +0100, Carlos Corbacho wrote:
> ACPI: WMI: Set instance for query block calls
> 
> From: Carlos Corbacho <carlos@strangeworlds.co.uk>
> 
> Although the necessary data structure was set up, it was never actually
> passed in, so data block calls have only been working by sheer chance.

Hm. Has this gone upstream? Looks pretty important for .27.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

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

* Re: acer-wmi broken in latest git kernel on TravelMate 6492 (Insufficient arguments - method [WQAA])
  2008-08-27 13:54   ` Matthew Garrett
@ 2008-08-27 14:24     ` Sven Wegener
  0 siblings, 0 replies; 5+ messages in thread
From: Sven Wegener @ 2008-08-27 14:24 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Carlos Corbacho, Bob Moore, Andi Kleen, Lin Ming, linux-acpi,
	linux-kernel

On Wed, 27 Aug 2008, Matthew Garrett wrote:

> On Sat, Aug 02, 2008 at 05:28:45PM +0100, Carlos Corbacho wrote:
> > ACPI: WMI: Set instance for query block calls
> > 
> > From: Carlos Corbacho <carlos@strangeworlds.co.uk>
> > 
> > Although the necessary data structure was set up, it was never actually
> > passed in, so data block calls have only been working by sheer chance.
> 
> Hm. Has this gone upstream? Looks pretty important for .27.

Yes, it's dab36ad8d50dc9424dfc4926f62aaf9bd52dcf13.

Sven

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

end of thread, other threads:[~2008-08-27 14:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-02 15:50 acer-wmi broken in latest git kernel on TravelMate 6492 (Insufficient arguments - method [WQAA]) Sven Wegener
2008-08-02 16:28 ` Carlos Corbacho
2008-08-02 17:01   ` Sven Wegener
2008-08-27 13:54   ` Matthew Garrett
2008-08-27 14:24     ` Sven Wegener

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