diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/libusb-glue.c | 16 |
2 files changed, 16 insertions, 6 deletions
@@ -1,3 +1,9 @@ +2010-05-23 Linus Walleij <triad@df.lth.se> + + * src/libusb-glue.c: don't probe HID equipment for device + descriptors, some Kensington mice don't like that and + there generally is not point either + 2010-05-16 Richard Low <richard@wentnet.com> * src/libusb-glue.c: usb bus location fix for Mac and disable diff --git a/src/libusb-glue.c b/src/libusb-glue.c index 10a75e1..23d602a 100644 --- a/src/libusb-glue.c +++ b/src/libusb-glue.c @@ -177,7 +177,7 @@ static mtpdevice_list_t *append_to_mtpdevice_list(mtpdevice_list_t *devlist, new_list_entry->libusb_device = newdevice; new_list_entry->bus_location = bus_location; new_list_entry->next = NULL; - + if (devlist == NULL) { return new_list_entry; } else { @@ -193,7 +193,7 @@ static mtpdevice_list_t *append_to_mtpdevice_list(mtpdevice_list_t *devlist, /** * Small recursive function to free dynamic memory allocated to the linked list * of USB MTP devices - * @param devlist dynamic linked list of pointers to usb devices with MTP + * @param devlist dynamic linked list of pointers to usb devices with MTP * properties. * @return nothing */ @@ -229,12 +229,16 @@ static int probe_device_descriptor(struct usb_device *dev, FILE *dumpfile) unsigned char buf[1024], cmd; int i; int ret; - - /* Don't examine hubs (no point in that) */ - if (dev->descriptor.bDeviceClass == USB_CLASS_HUB) { + + /* + * Don't examine hubs or HID devices, no point in that. + * (Some Kensington mice really don't like this.) + */ + if (dev->descriptor.bDeviceClass == USB_CLASS_HUB || + dev->descriptor.bDeviceClass == USB_CLASS_HID) { return 0; } - + /* Attempt to open Device on this port */ devh = usb_open(dev); if (devh == NULL) { |