linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Ignore garbage in dell-wmi events
@ 2009-04-28 17:40 Mario Limonciello
  2009-04-29 16:55 ` Matthew Garrett
  2009-04-29 20:16 ` Andrew Morton
  0 siblings, 2 replies; 5+ messages in thread
From: Mario Limonciello @ 2009-04-28 17:40 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: linux-acpi, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 537 bytes --]

Hi:

In debugging with some future machines that actually contain BIOS level
support for dell-wmi, I've determined that the upper half of the data
that comes back from wmi_get_event_data may sometimes contain extra
information that isn't currently relevant when pulling scan codes out of
the data.  This causes dell-wmi to improperly respond to these events.

I'm attaching a patch (Exchange would munge up the line breaks otherwise).

Thanks,

-- 
Mario Limonciello
*Dell | Linux Engineering*
mario_limonciello@dell.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: dell-wmi-mask-buffer.patch --]
[-- Type: text/x-patch; name="dell-wmi-mask-buffer.patch", Size: 693 bytes --]

--- a/drivers/platform/x86/dell-wmi.c~	2009-04-28 12:32:32.000000000 -0500
+++ b/drivers/platform/x86/dell-wmi.c	2009-04-28 12:33:02.000000000 -0500
@@ -182,7 +182,7 @@
 
 	if (obj && obj->type == ACPI_TYPE_BUFFER) {
 		int *buffer = (int *)obj->buffer.pointer;
-		key = dell_wmi_get_entry_by_scancode(buffer[1]);
+		key = dell_wmi_get_entry_by_scancode(0xFFFF & buffer[1]);
 		if (key) {
 			input_report_key(dell_wmi_input_dev, key->keycode, 1);
 			input_sync(dell_wmi_input_dev);
@@ -190,7 +190,7 @@
 			input_sync(dell_wmi_input_dev);
 		} else
 			printk(KERN_INFO "dell-wmi: Unknown key %x pressed\n",
-			       buffer[1]);
+			       0xFFFF & buffer[1]);
 	}
 }
 

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

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

* Re: [PATCH] Ignore garbage in dell-wmi events
  2009-04-28 17:40 [PATCH] Ignore garbage in dell-wmi events Mario Limonciello
@ 2009-04-29 16:55 ` Matthew Garrett
  2009-04-29 18:13   ` Mario Limonciello
  2009-04-29 20:16 ` Andrew Morton
  1 sibling, 1 reply; 5+ messages in thread
From: Matthew Garrett @ 2009-04-29 16:55 UTC (permalink / raw)
  To: Mario Limonciello; +Cc: linux-acpi, linux-kernel

Hi Mario,

Can you add your signed-off-by: for this?

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

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

* Re: [PATCH] Ignore garbage in dell-wmi events
  2009-04-29 16:55 ` Matthew Garrett
@ 2009-04-29 18:13   ` Mario Limonciello
  2009-04-29 18:28     ` Matthew Garrett
  0 siblings, 1 reply; 5+ messages in thread
From: Mario Limonciello @ 2009-04-29 18:13 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: linux-acpi, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 259 bytes --]

Sure.  Do you want me to resend all of them to add that?

Matthew Garrett wrote:
> Hi Mario,
>
> Can you add your signed-off-by: for this?
>
> Thanks,
>   
Regards,

-- 
Mario Limonciello
*Dell | Linux Engineering*
mario_limonciello@dell.com


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: dell-wmi-mask-buffer.patch --]
[-- Type: text/x-patch; name="dell-wmi-mask-buffer.patch", Size: 763 bytes --]

Signed-off-by: Mario Limonciello <mario_limonciello@dell.com>
---

--- a/drivers/platform/x86/dell-wmi.c~	2009-04-28 12:32:32.000000000 -0500
+++ b/drivers/platform/x86/dell-wmi.c	2009-04-28 12:33:02.000000000 -0500
@@ -182,7 +182,7 @@
 
 	if (obj && obj->type == ACPI_TYPE_BUFFER) {
 		int *buffer = (int *)obj->buffer.pointer;
-		key = dell_wmi_get_entry_by_scancode(buffer[1]);
+		key = dell_wmi_get_entry_by_scancode(0xFFFF & buffer[1]);
 		if (key) {
 			input_report_key(dell_wmi_input_dev, key->keycode, 1);
 			input_sync(dell_wmi_input_dev);
@@ -190,7 +190,7 @@
 			input_sync(dell_wmi_input_dev);
 		} else
 			printk(KERN_INFO "dell-wmi: Unknown key %x pressed\n",
-			       buffer[1]);
+			       0xFFFF & buffer[1]);
 	}
 }
 

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

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

* Re: [PATCH] Ignore garbage in dell-wmi events
  2009-04-29 18:13   ` Mario Limonciello
@ 2009-04-29 18:28     ` Matthew Garrett
  0 siblings, 0 replies; 5+ messages in thread
From: Matthew Garrett @ 2009-04-29 18:28 UTC (permalink / raw)
  To: Mario Limonciello; +Cc: linux-acpi, linux-kernel

I think just this and the additional keycodes one for now.

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

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

* Re: [PATCH] Ignore garbage in dell-wmi events
  2009-04-28 17:40 [PATCH] Ignore garbage in dell-wmi events Mario Limonciello
  2009-04-29 16:55 ` Matthew Garrett
@ 2009-04-29 20:16 ` Andrew Morton
  1 sibling, 0 replies; 5+ messages in thread
From: Andrew Morton @ 2009-04-29 20:16 UTC (permalink / raw)
  To: Mario Limonciello; +Cc: mjg59, linux-acpi, linux-kernel

On Tue, 28 Apr 2009 12:40:34 -0500
Mario Limonciello <mario_limonciello@dell.com> wrote:

> In debugging with some future machines that actually contain BIOS level
> support for dell-wmi, I've determined that the upper half of the data
> that comes back from wmi_get_event_data may sometimes contain extra
> information that isn't currently relevant when pulling scan codes out of
> the data.  This causes dell-wmi to improperly respond to these events.
> 
> I'm attaching a patch (Exchange would munge up the line breaks otherwise).

Can you please send along a Signed-off-by: for this patch? 
Documentation/SubmittingPatches explains what it's all about.

Thanks.

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

end of thread, other threads:[~2009-04-29 20:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-28 17:40 [PATCH] Ignore garbage in dell-wmi events Mario Limonciello
2009-04-29 16:55 ` Matthew Garrett
2009-04-29 18:13   ` Mario Limonciello
2009-04-29 18:28     ` Matthew Garrett
2009-04-29 20:16 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).