diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2008-03-11 10:20:12 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-03-24 22:26:14 -0700 |
commit | 392e1d9817d0024c96aae237c3c4349e47c976fd (patch) | |
tree | 41fb12fe0d67f36773c1dd5c2e70f51e37c30594 /drivers/usb/core/message.c | |
parent | 12cd5b984f825c5448aa4c0df561f8252076fd52 (diff) | |
download | op-kernel-dev-392e1d9817d0024c96aae237c3c4349e47c976fd.zip op-kernel-dev-392e1d9817d0024c96aae237c3c4349e47c976fd.tar.gz |
USB: new quirk flag to avoid Set-Interface
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>
Diffstat (limited to 'drivers/usb/core/message.c')
-rw-r--r-- | drivers/usb/core/message.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index fefb922..c311f67 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -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); |