Bug 26922
Summary: | 2.6.37 breaks USB wireless presenter HID device | ||
---|---|---|---|
Product: | Drivers | Reporter: | Thomas Bächler (thomas) |
Component: | Input Devices | Assignee: | drivers_input-devices |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | alan, florian, tomoki.sekiyama |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.37 | Subsystem: | |
Regression: | Yes | Bisected commit-id: |
Description
Thomas Bächler
2011-01-17 10:53:48 UTC
Unfortunately, the device seems to have the same Vendor ID and Product ID as YUREX leg-shakes sensors, and the commit 6bc235a2e2 added the ID to hid_ignore_list. I believe that we can distinguish YUREX and the Wireless Presenter by device type. This patch makes the driver ignore only YUREX, and recognize Wireless Presenter as generic HID. (I don't have the Wireless Presenter, so not yet tested.) Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@gmail.com> 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 88cb04e..021d298 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1672,7 +1672,6 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1006) }, { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1007) }, { HID_USB_DEVICE(USB_VENDOR_ID_IMATION, USB_DEVICE_ID_DISC_STAKKA) }, - { HID_USB_DEVICE(USB_VENDOR_ID_JESS, USB_DEVICE_ID_JESS_YUREX) }, { HID_USB_DEVICE(USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO) }, { HID_USB_DEVICE(USB_VENDOR_ID_KWORLD, USB_DEVICE_ID_KWORLD_RADIO_FM700) }, { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_GPEN_560) }, @@ -1786,6 +1785,11 @@ static bool hid_ignore(struct hid_device *hdev) hdev->product <= USB_DEVICE_ID_HANWANG_TABLET_LAST) return true; break; + case USB_VENDOR_ID_JESS: + if (hdev->product == USB_DEVICE_ID_JESS_YUREX && + hdev->type == HID_TYPE_USBNONE) + return true; + break; } if (hdev->type == HID_TYPE_USBMOUSE && diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 5489eab..ce3f947 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -1168,6 +1168,8 @@ static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id * if (intf->cur_altsetting->desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_MOUSE) hid->type = HID_TYPE_USBMOUSE; + else if (intf->cur_altsetting->desc.bInterfaceProtocol == 0) + hid->type = HID_TYPE_USBNONE; if (dev->manufacturer) strlcpy(hid->name, dev->manufacturer, sizeof(hid->name)); diff --git a/include/linux/hid.h b/include/linux/hid.h index bb0f56f..37f0e59 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -453,7 +453,8 @@ struct hid_input { enum hid_type { HID_TYPE_OTHER = 0, - HID_TYPE_USBMOUSE + HID_TYPE_USBMOUSE, + HID_TYPE_USBNONE = -1, }; struct hid_driver; -- 1.7.3.5 Sorry for the delay, I'll test this patch ASAP and get back to you then. Sorry again. Tested it and the patch works from my end. Bump. A solution to the problem is available, is this going to make it into the tree? The patch seems to be currently in mmotm tree ( http://userweb.kernel.org/~akpm/mmotm/ ) as usb-yurex-recognize-generalkeys-wireless-presenter-as-generic-hid.patch , and I'm waiting it to get merged. Or, do I have to do something to help it? A patch referencing this bug report has been merged in Linux v3.1-rc1: commit 6dc1418e13144162e8bc4858789010d8f0e1e65c Author: Tomoki Sekiyama <tomoki.sekiyama@gmail.com> Date: Mon May 23 15:45:44 2011 -0700 HID: yurex: recognize GeneralKeys wireless presenter as generic HID |