diff options
author | Roger Quadros <roger.quadros@nokia.com> | 2011-04-05 18:36:38 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-13 16:40:59 -0700 |
commit | 73ee4da994e7b97bd8241e39099cf3dd94675d79 (patch) | |
tree | 3883124d341dc96ea32aa5d097319cf3a32b2a2d /drivers/usb/gadget/f_mass_storage.c | |
parent | 654d121ad8c84e3442efee20b2a0703edb18c212 (diff) | |
download | linux-3.10-73ee4da994e7b97bd8241e39099cf3dd94675d79.tar.gz linux-3.10-73ee4da994e7b97bd8241e39099cf3dd94675d79.tar.bz2 linux-3.10-73ee4da994e7b97bd8241e39099cf3dd94675d79.zip |
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>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/f_mass_storage.c')
-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 98d6b39061d..e9de33d1c9a 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c @@ -599,6 +599,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: |