summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/composite.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2011-08-01 16:41:16 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-01 16:41:31 -0700
commitacab460b0f618e1e9663eea8c52ad5edd552ed1d (patch)
treec139f945e7a05ab3a12ced855453f8f48762d84e /drivers/usb/gadget/composite.c
parent8e36f79ecf4f8b09c5ee5041cf97f180e847838e (diff)
parent72c487dfb94d02025fb7437dfe2314d836d5a9ab (diff)
downloadop-kernel-dev-acab460b0f618e1e9663eea8c52ad5edd552ed1d.zip
op-kernel-dev-acab460b0f618e1e9663eea8c52ad5edd552ed1d.tar.gz
Merge branch 'for-greg' of master.kernel.org:/pub/scm/linux/kernel/git/balbi/usb into usb-linus
* 'for-greg' of master.kernel.org:/pub/scm/linux/kernel/git/balbi/usb: usb: musb: fix oops on musb_gadget_pullup usb: host: ehci-omap: fix .remove and failure handling path of .probe(v1) usb: gadget: hid: don't STALL when processing a HID Descriptor request usb: musb: fix Kconfig usb: musb: tusb6010_omap: fix build failure: error: 'musb' undeclared usb: gadget: composite: fix bMaxPacketSize for SuperSpeed usb: gadget: fusb300: remove #if 0 block usb: gadget: s3c2410_udc: fix unterminated platform_device_id table
Diffstat (limited to 'drivers/usb/gadget/composite.c')
-rw-r--r--drivers/usb/gadget/composite.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 5ef8779..aef4741 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -1079,10 +1079,12 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
cdev->desc.bMaxPacketSize0 =
cdev->gadget->ep0->maxpacket;
if (gadget_is_superspeed(gadget)) {
- if (gadget->speed >= USB_SPEED_SUPER)
+ if (gadget->speed >= USB_SPEED_SUPER) {
cdev->desc.bcdUSB = cpu_to_le16(0x0300);
- else
+ cdev->desc.bMaxPacketSize0 = 9;
+ } else {
cdev->desc.bcdUSB = cpu_to_le16(0x0210);
+ }
}
value = min(w_length, (u16) sizeof cdev->desc);
OpenPOWER on IntegriCloud