]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
USB: new quirk flag to avoid Set-Interface
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 11 Mar 2008 14:20:12 +0000 (10:20 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 25 Mar 2008 05:26:14 +0000 (22:26 -0700)
This patch (as1057) fixes a problem with the X-Rite/Gretag-Macbeth
Eye-One Pro display colorimeter; the device crashes when it receives a
Set-Interface request.  A new quirk (USB_QUIRK_NO_SET_INTF) is
introduced and a quirks entry is created for this device.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/message.c
drivers/usb/core/quirks.c
include/linux/usb/quirks.h

index fefb92296e8f5a921edf849a30caf808cf904793..c311f67b7f0824dba591b50d4b21f943827349b0 100644 (file)
@@ -1206,7 +1206,10 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate)
                return -EINVAL;
        }
 
-       ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+       if (dev->quirks & USB_QUIRK_NO_SET_INTF)
+               ret = -EPIPE;
+       else
+               ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
                                   USB_REQ_SET_INTERFACE, USB_RECIP_INTERFACE,
                                   alternate, interface, NULL, 0, 5000);
 
index d9d1eb19f2a134ecde7a5f5bad21cb195da0bdb1..dfc5418ea10c0a11654cb59d392bb535be0aad0b 100644 (file)
@@ -50,6 +50,9 @@ static const struct usb_device_id usb_quirk_list[] = {
        /* M-Systems Flash Disk Pioneers */
        { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME },
 
+       /* X-Rite/Gretag-Macbeth Eye-One Pro display colorimeter */
+       { USB_DEVICE(0x0971, 0x2000), .driver_info = USB_QUIRK_NO_SET_INTF },
+
        /* Action Semiconductor flash disk */
        { USB_DEVICE(0x10d6, 0x2200), .driver_info =
                        USB_QUIRK_STRING_FETCH_255 },
index 2692ec9389ca2047120f2b175b34076b88c0c049..1f999ec8d08c520c431d626e3bf5372e890c51a3 100644 (file)
@@ -9,3 +9,6 @@
 
 /* device can't resume correctly so reset it instead */
 #define USB_QUIRK_RESET_RESUME         0x00000002
+
+/* device can't handle Set-Interface requests */
+#define USB_QUIRK_NO_SET_INTF          0x00000004