]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
USB: core: add device-qualifier quirk
authorJohan Hovold <johan@kernel.org>
Mon, 25 Aug 2014 15:51:26 +0000 (17:51 +0200)
committerJiri Slaby <jslaby@suse.cz>
Thu, 13 Nov 2014 18:02:50 +0000 (19:02 +0100)
commit 2a159389bf5d962359349a76827b2f683276a1c7 upstream.

Add new quirk for devices that cannot handle requests for the
device_qualifier descriptor.

A USB-2.0 compliant device must respond to requests for the
device_qualifier descriptor (even if it's with a request error), but at
least one device is known to misbehave after such a request.

Suggested-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/usb/core/hub.c
include/linux/usb/quirks.h

index 48d3eed8e25094961277e1ca0efdff5a35bf2b04..420bf9bb09e54c9e0b0304d823fca11a4ef99951 100644 (file)
@@ -4347,6 +4347,9 @@ check_highspeed (struct usb_hub *hub, struct usb_device *udev, int port1)
        struct usb_qualifier_descriptor *qual;
        int                             status;
 
+       if (udev->quirks & USB_QUIRK_DEVICE_QUALIFIER)
+               return;
+
        qual = kmalloc (sizeof *qual, GFP_KERNEL);
        if (qual == NULL)
                return;
index c3ddcdc36598046942efdaef4370cb1c81810b99..3fb4288834601b55d72936f4c482d073a6346703 100644 (file)
@@ -47,4 +47,7 @@
 /* device generates spurious wakeup, ignore remote wakeup capability */
 #define USB_QUIRK_IGNORE_REMOTE_WAKEUP 0x00000200
 
+/* device can't handle device_qualifier descriptor requests */
+#define USB_QUIRK_DEVICE_QUALIFIER     0x00000100
+
 #endif /* __LINUX_USB_QUIRKS_H */