Re: [PATCH] HID: input: fix confusion on conflicting mappings

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

 



On Tue, 6 Jan 2015, David Herrmann wrote:

> >> On an PC-101/103/104 keyboard (American layout) the 'Enter' key and its
> >> neighbours look like this:
> >>
> >>            +---+ +---+ +-------+
> >>            | 1 | | 2 | |   5   |
> >>            +---+ +---+ +-------+
> >>              +---+ +-----------+
> >>              | 3 | |     4     |
> >>              +---+ +-----------+
> >
> > [ ... snip ... ]
> >
> > Alright, I can't really see this introducing any regressions. I have now
> > queued this for 3.20.
> 
> As Fredrik wrote, we need to also check for VARIABLE:

Gah, that's indeed a good catch. For some reason I don't seem to be CCed 
on Fredrik's mail :/

I have now applied the patch below on top of for-3.20/upstream, so that we 
don't keep -next unnecessarily broken.



From: Jiri Kosina <jkosina@xxxxxxx>
Subject: [PATCH] HID: fixup the conflicting keyboard mappings quirk

The ignore check that got added in 6ce901eb61 ("HID: input: fix confusion
on conflicting mappings") needs to properly check for VARIABLE reports
as well (ARRAY reports should be ignored), otherwise legitimate keyboards
might break.

Cc: <stable@xxxxxxxxxxxxxxx>
Fixes: 6ce901eb61 ("HID: input: fix confusion on conflicting mappings")
Reported-by: Fredrik Hallenberg <megahallon@xxxxxxxxx>
Reported-by: David Herrmann <dh.herrmann@xxxxxxxxx>
Signed-off-by: Jiri Kosina <jkosina@xxxxxxx>
---
 drivers/hid/hid-input.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 84b6899..a758900 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -1113,6 +1113,7 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
 	 */
 	if (!(field->flags & (HID_MAIN_ITEM_RELATIVE |
 	                      HID_MAIN_ITEM_BUFFERED_BYTE)) &&
+			      (field->flags & HID_MAIN_ITEM_VARIABLE) &&
 	    usage->usage_index < field->maxusage &&
 	    value == field->value[usage->usage_index])
 		return;
-- 
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux