diff options
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/input/hid-core.c | 35 | ||||
-rw-r--r-- | drivers/usb/storage/usb.c | 4 |
2 files changed, 30 insertions, 9 deletions
diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c index 8e86c3c6dc04..827a75a186ba 100644 --- a/drivers/usb/input/hid-core.c +++ b/drivers/usb/input/hid-core.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Copyright (c) 1999 Andreas Gal | 4 | * Copyright (c) 1999 Andreas Gal |
5 | * Copyright (c) 2000-2005 Vojtech Pavlik <vojtech@suse.cz> | 5 | * Copyright (c) 2000-2005 Vojtech Pavlik <vojtech@suse.cz> |
6 | * Copyright (c) 2005 Michael Haboustak <mike-@cinci.rr.com> for Concept2, Inc | 6 | * Copyright (c) 2005 Michael Haboustak <mike-@cinci.rr.com> for Concept2, Inc |
7 | * Copyright (c) 2006 Jiri Kosina | 7 | * Copyright (c) 2006-2007 Jiri Kosina |
8 | */ | 8 | */ |
9 | 9 | ||
10 | /* | 10 | /* |
@@ -27,9 +27,6 @@ | |||
27 | #include <linux/input.h> | 27 | #include <linux/input.h> |
28 | #include <linux/wait.h> | 28 | #include <linux/wait.h> |
29 | 29 | ||
30 | #undef DEBUG | ||
31 | #undef DEBUG_DATA | ||
32 | |||
33 | #include <linux/usb.h> | 30 | #include <linux/usb.h> |
34 | 31 | ||
35 | #include <linux/hid.h> | 32 | #include <linux/hid.h> |
@@ -756,6 +753,8 @@ void usbhid_init_reports(struct hid_device *hid) | |||
756 | 753 | ||
757 | #define USB_VENDOR_ID_LOGITECH 0x046d | 754 | #define USB_VENDOR_ID_LOGITECH 0x046d |
758 | #define USB_DEVICE_ID_LOGITECH_USB_RECEIVER 0xc101 | 755 | #define USB_DEVICE_ID_LOGITECH_USB_RECEIVER 0xc101 |
756 | #define USB_DEVICE_ID_LOGITECH_USB_RECEIVER_2 0xc517 | ||
757 | #define USB_DEVICE_ID_DINOVO_EDGE 0xc714 | ||
759 | 758 | ||
760 | #define USB_VENDOR_ID_IMATION 0x0718 | 759 | #define USB_VENDOR_ID_IMATION 0x0718 |
761 | #define USB_DEVICE_ID_DISC_STAKKA 0xd000 | 760 | #define USB_DEVICE_ID_DISC_STAKKA 0xd000 |
@@ -776,6 +775,8 @@ static const struct hid_blacklist { | |||
776 | unsigned quirks; | 775 | unsigned quirks; |
777 | } hid_blacklist[] = { | 776 | } hid_blacklist[] = { |
778 | 777 | ||
778 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_DINOVO_EDGE, HID_QUIRK_DUPLICATE_USAGES }, | ||
779 | |||
779 | { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_01, HID_QUIRK_IGNORE }, | 780 | { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_01, HID_QUIRK_IGNORE }, |
780 | { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_10, HID_QUIRK_IGNORE }, | 781 | { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_10, HID_QUIRK_IGNORE }, |
781 | { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_20, HID_QUIRK_IGNORE }, | 782 | { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_20, HID_QUIRK_IGNORE }, |
@@ -938,6 +939,7 @@ static const struct hid_blacklist { | |||
938 | { USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_TURBOX_KEYBOARD, HID_QUIRK_NOGET }, | 939 | { USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_TURBOX_KEYBOARD, HID_QUIRK_NOGET }, |
939 | 940 | ||
940 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_USB_RECEIVER, HID_QUIRK_BAD_RELATIVE_KEYS }, | 941 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_USB_RECEIVER, HID_QUIRK_BAD_RELATIVE_KEYS }, |
942 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_USB_RECEIVER_2, HID_QUIRK_LOGITECH_S510_DESCRIPTOR }, | ||
941 | 943 | ||
942 | { USB_VENDOR_ID_PANTHERLORD, USB_DEVICE_ID_PANTHERLORD_TWIN_USB_JOYSTICK, HID_QUIRK_MULTI_INPUT | HID_QUIRK_SKIP_OUTPUT_REPORTS }, | 944 | { USB_VENDOR_ID_PANTHERLORD, USB_DEVICE_ID_PANTHERLORD_TWIN_USB_JOYSTICK, HID_QUIRK_MULTI_INPUT | HID_QUIRK_SKIP_OUTPUT_REPORTS }, |
943 | 945 | ||
@@ -1035,6 +1037,22 @@ static void hid_fixup_sony_ps3_controller(struct usb_device *dev, int ifnum) | |||
1035 | kfree(buf); | 1037 | kfree(buf); |
1036 | } | 1038 | } |
1037 | 1039 | ||
1040 | /* | ||
1041 | * Logitech S510 keyboard sends in report #3 keys which are far | ||
1042 | * above the logical maximum described in descriptor. This extends | ||
1043 | * the original value of 0x28c of logical maximum to 0x104d | ||
1044 | */ | ||
1045 | static void hid_fixup_s510_descriptor(unsigned char *rdesc, int rsize) | ||
1046 | { | ||
1047 | if (rsize >= 90 && rdesc[83] == 0x26 | ||
1048 | && rdesc[84] == 0x8c | ||
1049 | && rdesc[85] == 0x02) { | ||
1050 | info("Fixing up Logitech S510 report descriptor"); | ||
1051 | rdesc[84] = rdesc[89] = 0x4d; | ||
1052 | rdesc[85] = rdesc[90] = 0x10; | ||
1053 | } | ||
1054 | } | ||
1055 | |||
1038 | static struct hid_device *usb_hid_configure(struct usb_interface *intf) | 1056 | static struct hid_device *usb_hid_configure(struct usb_interface *intf) |
1039 | { | 1057 | { |
1040 | struct usb_host_interface *interface = intf->cur_altsetting; | 1058 | struct usb_host_interface *interface = intf->cur_altsetting; |
@@ -1108,7 +1126,10 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf) | |||
1108 | if ((quirks & HID_QUIRK_CYMOTION)) | 1126 | if ((quirks & HID_QUIRK_CYMOTION)) |
1109 | hid_fixup_cymotion_descriptor(rdesc, rsize); | 1127 | hid_fixup_cymotion_descriptor(rdesc, rsize); |
1110 | 1128 | ||
1111 | #ifdef DEBUG_DATA | 1129 | if (quirks & HID_QUIRK_LOGITECH_S510_DESCRIPTOR) |
1130 | hid_fixup_s510_descriptor(rdesc, rsize); | ||
1131 | |||
1132 | #ifdef CONFIG_HID_DEBUG | ||
1112 | printk(KERN_DEBUG __FILE__ ": report descriptor (size %u, read %d) = ", rsize, n); | 1133 | printk(KERN_DEBUG __FILE__ ": report descriptor (size %u, read %d) = ", rsize, n); |
1113 | for (n = 0; n < rsize; n++) | 1134 | for (n = 0; n < rsize; n++) |
1114 | printk(" %02x", (unsigned char) rdesc[n]); | 1135 | printk(" %02x", (unsigned char) rdesc[n]); |
@@ -1224,8 +1245,8 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf) | |||
1224 | le16_to_cpu(dev->descriptor.idProduct)); | 1245 | le16_to_cpu(dev->descriptor.idProduct)); |
1225 | 1246 | ||
1226 | hid->bus = BUS_USB; | 1247 | hid->bus = BUS_USB; |
1227 | hid->vendor = dev->descriptor.idVendor; | 1248 | hid->vendor = le16_to_cpu(dev->descriptor.idVendor); |
1228 | hid->product = dev->descriptor.idProduct; | 1249 | hid->product = le16_to_cpu(dev->descriptor.idProduct); |
1229 | 1250 | ||
1230 | usb_make_path(dev, hid->phys, sizeof(hid->phys)); | 1251 | usb_make_path(dev, hid->phys, sizeof(hid->phys)); |
1231 | strlcat(hid->phys, "/input", sizeof(hid->phys)); | 1252 | strlcat(hid->phys, "/input", sizeof(hid->phys)); |
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 7e7ec29782f1..8e898e3d861e 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c | |||
@@ -55,7 +55,7 @@ | |||
55 | #include <linux/slab.h> | 55 | #include <linux/slab.h> |
56 | #include <linux/kthread.h> | 56 | #include <linux/kthread.h> |
57 | #include <linux/mutex.h> | 57 | #include <linux/mutex.h> |
58 | #include <linux/utsrelease.h> | 58 | #include <linux/utsname.h> |
59 | 59 | ||
60 | #include <scsi/scsi.h> | 60 | #include <scsi/scsi.h> |
61 | #include <scsi/scsi_cmnd.h> | 61 | #include <scsi/scsi_cmnd.h> |
@@ -547,7 +547,7 @@ static int get_device_info(struct us_data *us, const struct usb_device_id *id) | |||
547 | idesc->bInterfaceSubClass, | 547 | idesc->bInterfaceSubClass, |
548 | idesc->bInterfaceProtocol, | 548 | idesc->bInterfaceProtocol, |
549 | msgs[msg], | 549 | msgs[msg], |
550 | UTS_RELEASE); | 550 | utsname()->release); |
551 | } | 551 | } |
552 | 552 | ||
553 | return 0; | 553 | return 0; |