[PATCH] usb: gadget: f_mass_storage: fix req->length for reset request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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().

Set req->length to zero since the reset request does not 
contain any data transfers.

Signed-off-by: Maulik Mankad <maulik@xxxxxx>
Cc: Michal Nazarewicz <m.nazarewicz@xxxxxxxxxxx>
Cc: Felipe Balbi <balbi@xxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
Tested on OMAP4 SDP
Index: mainline/drivers/usb/gadget/f_mass_storage.c
===================================================================
--- mainline.orig/drivers/usb/gadget/f_mass_storage.c
+++ mainline/drivers/usb/gadget/f_mass_storage.c
@@ -631,6 +631,7 @@ static int fsg_setup(struct usb_function
 		/* Raise an exception to stop the current operation
 		 * and reinitialize our state. */
 		DBG(fsg, "bulk reset request\n");
+		fsg->common->ep0req->length = 0;
 		raise_exception(fsg->common, FSG_STATE_RESET);
 		return DELAYED_STATUS;
 
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux