Commit 73ee4da9 authored by Roger Quadros's avatar Roger Quadros Committed by Greg Kroah-Hartman

usb: gadget: f_mass_storage: Fix Bulk-only RESET handling

The ep0 request tag was not recorded thus resulting in phase
problems while sending status/response in handle_execption() handler.
This was resulting in MSC compliance test failures with USBCV tool.

With this patch, the Bulk-Only Mass storage RESET request is
handled correctly and the MSC compliance tests pass.
Signed-off-by: default avatarRoger Quadros <roger.quadros@nokia.com>
Acked-by: default avatarMichal Nazarewicz <mina86@mina86.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 654d121a
...@@ -599,6 +599,11 @@ static int fsg_setup(struct usb_function *f, ...@@ -599,6 +599,11 @@ static int fsg_setup(struct usb_function *f,
if (!fsg_is_set(fsg->common)) if (!fsg_is_set(fsg->common))
return -EOPNOTSUPP; return -EOPNOTSUPP;
++fsg->common->ep0_req_tag; /* Record arrival of a new request */
req->context = NULL;
req->length = 0;
dump_msg(fsg, "ep0-setup", (u8 *) ctrl, sizeof(*ctrl));
switch (ctrl->bRequest) { switch (ctrl->bRequest) {
case USB_BULK_RESET_REQUEST: case USB_BULK_RESET_REQUEST:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment