提交 2edb11cb 编写于 作者: M Maulik Mankad 提交者: Greg Kroah-Hartman

usb: gadget: composite: fix req->length in composite_setup()

When USB CV MSC tests are run on f_mass_storage gadget
Bulk Only Mass Storage Reset fails since req->length
is set to USB_BUFSIZ=1024 in composite_setup().

Initialize req->length to zero to fix this.
Signed-off-by: NMaulik Mankad <maulik@ti.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 3b29b68b
......@@ -813,7 +813,7 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
*/
req->zero = 0;
req->complete = composite_setup_complete;
req->length = USB_BUFSIZ;
req->length = 0;
gadget->ep0->driver_data = cdev;
switch (ctrl->bRequest) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册