From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513 Description of problem: The USB driver code mishandles HID devices which have generic desktop undefined usages. The undefined usage is mistaken for a button usage. The device where I see this is an Elo TouchSystems Accutouch touchscreen with USB interface. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1.plug in USB HID with a general desktop undefined usage. i.e. Elo AccutTouch 3000U. 2.Use evtest to check input event interface. A button is reported for the undefined usage. 3. Actual Results: [root@localhost msalter]# evtest /dev/input/event0 Input driver version is 1.0.0 Input device ID: bus 0x3 vendor 0x4e7 product 0x8 version 0x101 Input device name: "Elo TouchSystems, Inc. Elo TouchSystems AccuTouch 3000U" Supported events: Event type 1 (Key) Event code 272 (LeftBtn) Event type 3 (Absolute) Event code 0 (X) Value 0 Min -128 Max 127 Flat 15 Event code 1 (Y) Value 3065 Min 184 Max 3932 Fuzz 14 Flat 234 Event code 2 (Z) Value 3204 Min 184 Max 3932 Fuzz 14 Flat 234 Event code 11 (?) Value 0 Min 0 Max 256 Fuzz 1 Flat 16 Expected Results: [root@localhost msalter]# evtest /dev/input/event0 Input driver version is 1.0.0 Input device ID: bus 0x3 vendor 0x4e7 product 0x8 version 0x101 Input device name: "Elo TouchSystems, Inc. Elo TouchSystems AccuTouch 3000U" Supported events: Event type 1 (Key) Event code 272 (LeftBtn) Event type 3 (Absolute) Event code 0 (X) Value 0 Min 184 Max 3932 Fuzz 14 Flat 234 Event code 1 (Y) Value 0 Min 184 Max 3932 Fuzz 14 Flat 234 Event code 11 (?) Value 0 Min 0 Max 256 Fuzz 1 Flat 16 Additional info: The following patch corrects the problem: diff -rup kernel-2.4.18.orig/linux/drivers/usb/hid-input.c kernel-2.4.18/linux/drivers/usb/hid-input.c --- kernel-2.4.18.orig/linux/drivers/usb/hid-input.c Sun Nov 11 13:09:37 2001 +++ kernel-2.4.18/linux/drivers/usb/hid-input.c Tue Oct 8 13:41:51 2002 @@ -103,6 +103,10 @@ static void hidinput_configure_usage(str case HID_UP_GENDESK: + /* ignore undefined usage */ + if ((usage->hid & 0xffff) == 0x0000) + return; + if ((usage->hid & 0xf0) == 0x80) { /* SystemControl */ switch (usage->hid & 0xf) { case 0x1: usage->code = KEY_POWER; break;
Hmm, there is something weird with this bug report - you're reporting that there is an extra button in evtest results, yet the two examples of evtest results (actual and expected) differ by the presence of the Z axis. So is it the Z axis that's extra. A descriptor dump would help a lot here. (And yes, there is a problem with handling values in reports that don't have an usage attached to them, causing possibly an oops. It should be fixed in my BK tree at bk://kernel.bkbits.org/vojtech/input However, it will actually create more input mappings than before.)
Vojtech, how do they generate a descriptor dump, for future reference? Obviously, lsusb cannot show hid descriptors.
Thanks for the bug report. However, Red Hat no longer maintains this version of the product. Please upgrade to the latest version and open a new bug if the problem persists. The Fedora Legacy project (http://fedoralegacy.org/) maintains some older releases, and if you believe this bug is interesting to them, please report the problem in the bug tracker at: http://bugzilla.fedora.us/