diff options
| author | Vijayavardhan Vennapusa <vvreddy@codeaurora.org> | 2013-10-17 15:00:02 +0530 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:02:52 -0700 |
| commit | bdf0a2e431e52bc00858f1df8b109d6254fe3e13 (patch) | |
| tree | f0c7831762ecbba853cf290b6704dd02c074b880 /drivers/usb/gadget/function | |
| parent | 92e284a5d5d5014a10797d6295d557951ddc1fb7 (diff) | |
USB: f_mass_storage: Send GADGET_DELAYED_STATUS for MSC RESET command
When Host sends MSC RESET command to the device, device is expected
to clear HALT condition on the bulk IN endpoint as part of handling it,
before sending status phase to the Host. Since handling of MSC RESET is
done by sending signal to fsg_thread, it could take time for handling it.
It could lead to sending bulk IN endpoint as halted, when host asks for
endpoint status as status phase is sent for MSC RESET command immediately
after it is received. Due to this, MSC compliance tests fail. Hence send
delayed status in case of MSC RESET and send status phase after it is
handled and cleared halt condition.
CRs-Fixed: 547929
Change-Id: If80d0ffb2d012724b899772b1b45dff8092bd8d5
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Diffstat (limited to 'drivers/usb/gadget/function')
| -rw-r--r-- | drivers/usb/gadget/function/f_mass_storage.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/usb/gadget/function/f_mass_storage.c b/drivers/usb/gadget/function/f_mass_storage.c index 223ccf89d226..b135da661fc9 100644 --- a/drivers/usb/gadget/function/f_mass_storage.c +++ b/drivers/usb/gadget/function/f_mass_storage.c @@ -2451,9 +2451,13 @@ static void handle_exception(struct fsg_common *common) &common->fsg->atomic_bitflags)) usb_ep_clear_halt(common->fsg->bulk_in); - if (common->ep0_req_tag == exception_req_tag) - ep0_queue(common); /* Complete the status stage */ - + if (common->ep0_req_tag == exception_req_tag) { + /* Complete the status stage */ + if (common->cdev) + usb_composite_setup_continue(common->cdev); + else + ep0_queue(common); + } /* * Technically this should go here, but it would only be * a waste of time. Ditto for the INTERFACE_CHANGE and |
