Ignore garbage in dell-wmi events
Subsystems (2)
PATCH 1/1 Ignore garbage in dell-wmi events
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,
Signature · 3 lines
Mario Limonciello *Dell | Linux Engineering* [email protected]
drivers/platform/x86/dell-wmi.c renamed from drivers/platform/x86/dell-wmi.c~ +2 -2
@@ -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 ]); } }
Hi Mario,
Can you add your signed-off-by: for this?
Thanks,
Signature · 1 line
Matthew Garrett | [email protected]
Sure. Do you want me to resend all of them to add that?
Quoted 6 lines · Matthew Garrett
Hi Mario,
Can you add your signed-off-by: for this?
Thanks,
Regards,
Signature · 3 lines
Mario Limonciello *Dell | Linux Engineering* [email protected]
---
drivers/platform/x86/dell-wmi.c renamed from drivers/platform/x86/dell-wmi.c~ +2 -2
@@ -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 ]); } }
I think just this and the additional keycodes one for now.
Signature · 1 line
Matthew Garrett | [email protected]
Quoted 7 lines · On Tue, 28 Apr 2009 12:40:34 -0500 Mario Limonciello…
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_datamay 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.