]> git.karo-electronics.de Git - mv-sheeva.git/commit
x86 platform drivers: hp-wmi fix buffer size depending on ACPI version
authorThomas Renninger <trenn@suse.de>
Fri, 21 May 2010 14:41:43 +0000 (16:41 +0200)
committerMatthew Garrett <mjg@redhat.com>
Tue, 3 Aug 2010 13:48:43 +0000 (09:48 -0400)
commit8dda6b0410cfc64642b2ed5b37987292f6321d0f
tree53d27d9f692969ca081149bb6dab22950fef24f8
parent1bbdfd5961e83a1e3037d9362094bd09e0b066ab
x86 platform drivers: hp-wmi fix buffer size depending on ACPI version

Depending on ACPI version (1.0 -> 32 bit) an integer could be
32 or 64 bit long. _WED internal concatenates two integers and
the return value will be 8 byte (2* 32 bit) or 16 byte (2* 64 bit)
long, depending on the ACPI version.

Also the data send with the WMI event is defined to be splitted into:
  - Event ID -> 4 bytes
  - Event Data -> 4 bytes

This gets messed up with new ACPI versions.
But it's a HP BIOS bug that may get fixed in the future
-> Support both, 16 and 8 byte _WED buffers.

Also the wrong assumption that from the event data sent, only the
first byte is relevant got cleaned up that it fits event_id/event_data
as described above.

Signed-off-by: Thomas Renninger <trenn@suse.de>
CC: robert.moore@intel.com
Signed-off-by: Matthew Garrett <mjg@redhat.com>
CC: platform-driver-x86@vger.kernel.org
CC: linux-acpi@vger.kernel.org
drivers/platform/x86/hp-wmi.c