diff options
author | Rakesh Bodla <rbodla@nvidia.com> | 2011-06-13 17:23:38 +0530 |
---|---|---|
committer | Yuhao Ding <yding@nvidia.com> | 2011-06-16 18:25:56 -0700 |
commit | 6fbd5ae6491399581c4c719789c7e9259d40c504 (patch) | |
tree | 69d139c1465d5a7defa30f5832c5d76f1f2e36d7 | |
parent | 113676ec197fc62b7dce23dad4e081c940319846 (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.
(cherry picked from commit 73ee4da994e7b97bd8241e39099cf3dd94675d79)
Change-Id: Ia5beffe1e38b518b63b80dda36faf06b86f7a6cb
Reviewed-on: http://git-master/r/36274
Tested-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-by: Hanumanth Venkateswa Moganty <vmoganty@nvidia.com>
-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 9e37e0863143..d0806bae145b 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c @@ -623,6 +623,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: |