diff options
author | Maulik Mankad <maulik@ti.com> | 2011-02-22 19:08:42 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-25 11:36:19 -0800 |
commit | 2edb11cbac95231f66f1239b3ca26bdc0967183a (patch) | |
tree | cafb920f1003440a4b4766c43f31aec922fadd21 /drivers/usb/gadget/composite.c | |
parent | 3b29b68b1627781b5eecb581d3b9d5f0043a72f2 (diff) |
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: Maulik Mankad <maulik@ti.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/composite.c')
-rw-r--r-- | drivers/usb/gadget/composite.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 53e0496c71b..c2251c40a20 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -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) { |