aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/input/hid-core.c7
-rw-r--r--drivers/usb/input/hid-input.c4
-rw-r--r--drivers/usb/input/hid.h1
3 files changed, 11 insertions, 1 deletions
diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c
index 6daf85c6eeee..6095d9cedb7e 100644
--- a/drivers/usb/input/hid-core.c
+++ b/drivers/usb/input/hid-core.c
@@ -1643,6 +1643,9 @@ void hid_init_reports(struct hid_device *hid)
1643#define USB_VENDOR_ID_AIRCABLE 0x16CA 1643#define USB_VENDOR_ID_AIRCABLE 0x16CA
1644#define USB_DEVICE_ID_AIRCABLE1 0x1502 1644#define USB_DEVICE_ID_AIRCABLE1 0x1502
1645 1645
1646#define USB_VENDOR_ID_LOGITECH 0x046d
1647#define USB_DEVICE_ID_LOGITECH_USB_RECEIVER 0xc101
1648
1646/* 1649/*
1647 * Alphabetically sorted blacklist by quirk type. 1650 * Alphabetically sorted blacklist by quirk type.
1648 */ 1651 */
@@ -1811,7 +1814,9 @@ static const struct hid_blacklist {
1811 { USB_VENDOR_ID_PANJIT, 0x0004, HID_QUIRK_IGNORE }, 1814 { USB_VENDOR_ID_PANJIT, 0x0004, HID_QUIRK_IGNORE },
1812 1815
1813 { USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_TURBOX_KEYBOARD, HID_QUIRK_NOGET }, 1816 { USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_TURBOX_KEYBOARD, HID_QUIRK_NOGET },
1814 1817
1818 { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_USB_RECEIVER, HID_QUIRK_BAD_RELATIVE_KEYS },
1819
1815 { 0, 0 } 1820 { 0, 0 }
1816}; 1821};
1817 1822
diff --git a/drivers/usb/input/hid-input.c b/drivers/usb/input/hid-input.c
index 9a808a3b4d37..c8ce65c70a42 100644
--- a/drivers/usb/input/hid-input.c
+++ b/drivers/usb/input/hid-input.c
@@ -564,6 +564,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
564 || ((device->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_7) && (usage->hid == 0x00090007))) 564 || ((device->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_7) && (usage->hid == 0x00090007)))
565 goto ignore; 565 goto ignore;
566 566
567 if ((device->quirks & HID_QUIRK_BAD_RELATIVE_KEYS) &&
568 usage->type == EV_KEY && (field->flags & HID_MAIN_ITEM_RELATIVE))
569 field->flags &= ~HID_MAIN_ITEM_RELATIVE;
570
567 set_bit(usage->type, input->evbit); 571 set_bit(usage->type, input->evbit);
568 572
569 while (usage->code <= max && test_and_set_bit(usage->code, bit)) 573 while (usage->code <= max && test_and_set_bit(usage->code, bit))
diff --git a/drivers/usb/input/hid.h b/drivers/usb/input/hid.h
index 9b50effef758..8aa9ec08e8ab 100644
--- a/drivers/usb/input/hid.h
+++ b/drivers/usb/input/hid.h
@@ -260,6 +260,7 @@ struct hid_item {
260#define HID_QUIRK_POWERBOOK_HAS_FN 0x00001000 260#define HID_QUIRK_POWERBOOK_HAS_FN 0x00001000
261#define HID_QUIRK_POWERBOOK_FN_ON 0x00002000 261#define HID_QUIRK_POWERBOOK_FN_ON 0x00002000
262#define HID_QUIRK_INVERT_HWHEEL 0x00004000 262#define HID_QUIRK_INVERT_HWHEEL 0x00004000
263#define HID_QUIRK_BAD_RELATIVE_KEYS 0x00008000
263 264
264/* 265/*
265 * This is the global environment of the parser. This information is 266 * This is the global environment of the parser. This information is