commit d4fe2bbe7a065a8aee77612356d8057239a03b84
Author: Alan Stern <[EMAIL PROTECTED]>
Date: Tue Mar 25 06:35:12 2008 +0000
USB: new quirk flag to avoid Set-Interface
upstream commit: 392e1d9817d0024c96aae237c3c4349e47c976fd
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 <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
[EMAIL PROTECTED]: backport to 2.6.24.4]
Signed-off-by: Chris Wright <[EMAIL PROTECTED]>
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
index fcd40ec..d864239 100644
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -1189,7 +1189,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);
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index d42c561..fb552d7 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -39,6 +39,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 },
+
/* Philips PSC805 audio device */
{ USB_DEVICE(0x0471, 0x0155), .driver_info = USB_QUIRK_RESET_RESUME },
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h
index 2692ec9..1f999ec 100644
--- a/include/linux/usb/quirks.h
+++ b/include/linux/usb/quirks.h
@@ -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
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs