summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2014-08-25 17:51:26 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-14 09:00:05 -0800
commit98bc9c6c6d459e252d27549492be6c4603ff2a3e (patch)
tree99fc4b9d67c6db0d619775f304d97bb5a4161cf0
parentb944ad83dbdaa0d02ed9e0a1d5749475f62561a4 (diff)
downloadkernel-common-98bc9c6c6d459e252d27549492be6c4603ff2a3e.tar.gz
kernel-common-98bc9c6c6d459e252d27549492be6c4603ff2a3e.tar.bz2
kernel-common-98bc9c6c6d459e252d27549492be6c4603ff2a3e.zip
USB: core: add device-qualifier quirk
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/core/hub.c3
-rw-r--r--include/linux/usb/quirks.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 445d62a4316a..d2bd9d7c8f4b 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -4378,6 +4378,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;
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h
index 49587dc22f5d..8b96ae2a38fe 100644
--- a/include/linux/usb/quirks.h
+++ b/include/linux/usb/quirks.h
@@ -33,4 +33,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 */