aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/usbhid
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/usbhid')
-rw-r--r--drivers/hid/usbhid/hid-core.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index c94516c05a4e..762cb35e769b 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -225,9 +225,10 @@ MODULE_PARM_DESC(mousepoll, "Polling interval of mice");
225#define USB_DEVICE_ID_LD_MACHINETEST 0x2040 225#define USB_DEVICE_ID_LD_MACHINETEST 0x2040
226 226
227#define USB_VENDOR_ID_LOGITECH 0x046d 227#define USB_VENDOR_ID_LOGITECH 0x046d
228#define USB_DEVICE_ID_LOGITECH_USB_RECEIVER 0xc101 228#define USB_DEVICE_ID_LOGITECH_RECEIVER 0xc101
229#define USB_DEVICE_ID_S510_USB_RECEIVER 0xc50c 229#define USB_DEVICE_ID_S510_RECEIVER 0xc50c
230#define USB_DEVICE_ID_S510_USB_RECEIVER_2 0xc517 230#define USB_DEVICE_ID_S510_RECEIVER_2 0xc517
231#define USB_DEVICE_ID_MX3000_RECEIVER 0xc513
231#define USB_DEVICE_ID_DINOVO_EDGE 0xc714 232#define USB_DEVICE_ID_DINOVO_EDGE 0xc714
232 233
233#define USB_VENDOR_ID_MCC 0x09db 234#define USB_VENDOR_ID_MCC 0x09db
@@ -297,7 +298,7 @@ static const struct hid_blacklist {
297 { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK_7 }, 298 { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK_7 },
298 { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE, HID_QUIRK_2WHEEL_MOUSE_HACK_5 }, 299 { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE, HID_QUIRK_2WHEEL_MOUSE_HACK_5 },
299 300
300 { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_USB_RECEIVER, HID_QUIRK_BAD_RELATIVE_KEYS }, 301 { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RECEIVER, HID_QUIRK_BAD_RELATIVE_KEYS },
301 302
302 { USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_GAMEPAD, HID_QUIRK_BADPAD }, 303 { USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_GAMEPAD, HID_QUIRK_BADPAD },
303 { USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_PREDATOR, HID_QUIRK_BADPAD }, 304 { USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_PREDATOR, HID_QUIRK_BADPAD },
@@ -434,8 +435,9 @@ static const struct hid_blacklist {
434 { USB_VENDOR_ID_ACECAD, USB_DEVICE_ID_ACECAD_FLAIR, HID_QUIRK_IGNORE }, 435 { USB_VENDOR_ID_ACECAD, USB_DEVICE_ID_ACECAD_FLAIR, HID_QUIRK_IGNORE },
435 { USB_VENDOR_ID_ACECAD, USB_DEVICE_ID_ACECAD_302, HID_QUIRK_IGNORE }, 436 { USB_VENDOR_ID_ACECAD, USB_DEVICE_ID_ACECAD_302, HID_QUIRK_IGNORE },
436 437
437 { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_USB_RECEIVER, HID_QUIRK_LOGITECH_S510_DESCRIPTOR }, 438 { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_MX3000_RECEIVER, HID_QUIRK_LOGITECH_DESCRIPTOR },
438 { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_USB_RECEIVER_2, HID_QUIRK_LOGITECH_S510_DESCRIPTOR }, 439 { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_RECEIVER, HID_QUIRK_LOGITECH_DESCRIPTOR },
440 { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_RECEIVER_2, HID_QUIRK_LOGITECH_DESCRIPTOR },
439 441
440 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE, HID_QUIRK_MIGHTYMOUSE | HID_QUIRK_INVERT_HWHEEL }, 442 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE, HID_QUIRK_MIGHTYMOUSE | HID_QUIRK_INVERT_HWHEEL },
441 443
@@ -1049,16 +1051,16 @@ static void hid_fixup_sony_ps3_controller(struct usb_device *dev, int ifnum)
1049} 1051}
1050 1052
1051/* 1053/*
1052 * Logitech S510 keyboard sends in report #3 keys which are far 1054 * Certain Logitech keyboards send in report #3 keys which are far
1053 * above the logical maximum described in descriptor. This extends 1055 * above the logical maximum described in descriptor. This extends
1054 * the original value of 0x28c of logical maximum to 0x104d 1056 * the original value of 0x28c of logical maximum to 0x104d
1055 */ 1057 */
1056static void hid_fixup_s510_descriptor(unsigned char *rdesc, int rsize) 1058static void hid_fixup_logitech_descriptor(unsigned char *rdesc, int rsize)
1057{ 1059{
1058 if (rsize >= 90 && rdesc[83] == 0x26 1060 if (rsize >= 90 && rdesc[83] == 0x26
1059 && rdesc[84] == 0x8c 1061 && rdesc[84] == 0x8c
1060 && rdesc[85] == 0x02) { 1062 && rdesc[85] == 0x02) {
1061 info("Fixing up Logitech S510 report descriptor"); 1063 info("Fixing up Logitech keyboard report descriptor");
1062 rdesc[84] = rdesc[89] = 0x4d; 1064 rdesc[84] = rdesc[89] = 0x4d;
1063 rdesc[85] = rdesc[90] = 0x10; 1065 rdesc[85] = rdesc[90] = 0x10;
1064 } 1066 }
@@ -1138,8 +1140,8 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
1138 if ((quirks & HID_QUIRK_CYMOTION)) 1140 if ((quirks & HID_QUIRK_CYMOTION))
1139 hid_fixup_cymotion_descriptor(rdesc, rsize); 1141 hid_fixup_cymotion_descriptor(rdesc, rsize);
1140 1142
1141 if (quirks & HID_QUIRK_LOGITECH_S510_DESCRIPTOR) 1143 if (quirks & HID_QUIRK_LOGITECH_DESCRIPTOR)
1142 hid_fixup_s510_descriptor(rdesc, rsize); 1144 hid_fixup_logitech_descriptor(rdesc, rsize);
1143 1145
1144#ifdef CONFIG_HID_DEBUG 1146#ifdef CONFIG_HID_DEBUG
1145 printk(KERN_DEBUG __FILE__ ": report descriptor (size %u, read %d) = ", rsize, n); 1147 printk(KERN_DEBUG __FILE__ ": report descriptor (size %u, read %d) = ", rsize, n);