USB: core: add device-qualifier quirk
authorJohan Hovold <johan@kernel.org>
Mon, 25 Aug 2014 15:51:26 +0000 (17:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Sep 2014 04:15:39 +0000 (21:15 -0700)
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hub.c
include/linux/usb/quirks.h

index d481c99a20d7b13adc9b9ec5c00565fd7d0ecc60..c01b724675243d33e87c43188b0c7e0fddf79fb1 100644 (file)
@@ -4538,6 +4538,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 55a17b188daa7481a04d7d0da19be56ad654f5b6..ffe565c94743ca1084199d943dd6102b5daa5d2c 100644 (file)
@@ -41,4 +41,7 @@
  */
 #define USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL 0x00000080
 
+/* device can't handle device_qualifier descriptor requests */
+#define USB_QUIRK_DEVICE_QUALIFIER     0x00000100
+
 #endif /* __LINUX_USB_QUIRKS_H */