asus-wmi WMI event queue handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Since commit 1a373d15e283 ("platform/x86: asus-wmi: Support WMI event queue"), the driver
flushes some sort of queue holding event data entries during probe by repeatedly calling
wmi_get_event_data() to work around an issue inside the ASUS ACPI code.

Since the whole driver should someday be converted to an modern WMI driver, this behavior
could turn out to be problematic since wmi_get_event_data() is not supported when using
the modern interface.

Because of this i was asking myself if this issue could be fixed inside the WMI core itself.
AFAIK the queue only needs to be flushed because the driver stops handling events
(more specifically: stops calling wmi_get_event_data() upon receiving an event) when removed.
Looking at the WMI-ACPI spec, it seems that the event data should be retrieved unconditionally:

	"The _WED control method  is evaluated by the mapper in response to receiving a
	 notification from a control method."

It seems that the ASUS ACPI code depends on this behavior, here is an ASL example:

	Method (_WED, 1, NotSerialized)  // _Wxx: Wake Event, xx=0x00-0xFF
	{
		If ((Arg0 == 0xFF))
		{
			Return (GANQ ())
		}

		Return (Ones)
	}

This could be fixed inside the WMI core by unconditionally retrieving event data upon receiving
an WMI event. This would then allow asus-wmi to potentially become a modern WMI driver in the
future and might even benefit other machines which also depend on this behavior.
Would it be possible for you (or someone else) to test some patches on an affected machine?

Thanks,
Armin Wolf






[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux