diff options
author | Roger Quadros <roger.quadros@nokia.com> | 2011-04-05 18:36:38 +0300 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-07-08 22:51:29 -0700 |
commit | d5660040d7a0c2a4d59766caf86e3ed61dc88b09 (patch) | |
tree | 948f9f0e8ae5936953ed56cb8034c1cf4a75bca3 /drivers/usb | |
parent | 71ede97403fdbe56f8f0c32f81d88ed62058bc97 (diff) |
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: Roger Quadros <roger.quadros@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
(cherry picked from commit 73ee4da994e7b97bd8241e39099cf3dd94675d79 kernel.org, linux-2.6 tree)
Change-Id: I6b98f73c0ddb2072d6be28cfdc45fee6c25b1689
Reviewed-on: http://git-master/r/37781
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/f_mass_storage.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c index 6c8ce084e605..9fa0c222da1c 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c @@ -624,6 +624,11 @@ static int fsg_setup(struct usb_function *f, if (!fsg_is_set(fsg->common)) 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) { case USB_BULK_RESET_REQUEST: |