From: Maulik Mankad Date: Tue, 22 Feb 2011 13:38:42 +0000 (+0530) Subject: usb: gadget: composite: fix req->length in composite_setup() X-Git-Tag: v2.6.39-rc1~472^2~100 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2edb11cbac;p=karo-tx-linux.git 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 Cc: Alan Stern Cc: Michal Nazarewicz Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 53e0496c71b5..c2251c40a205 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) {