diff options
author | Thinh Nguyen <Thinh.Nguyen@synopsys.com> | 2020-09-02 18:43:04 -0700 |
---|---|---|
committer | Felipe Balbi <balbi@kernel.org> | 2020-09-24 11:56:01 +0300 |
commit | d97c78a1908e59a1fdbcbece87cd0440b5d7a1f2 (patch) | |
tree | b40473c2b1da41d86769218a671d5487cd92d41f /drivers/usb/dwc3/gadget.h | |
parent | c503672abe1348f10f5a54a662336358c6e1a297 (diff) | |
download | lwn-d97c78a1908e59a1fdbcbece87cd0440b5d7a1f2.tar.gz lwn-d97c78a1908e59a1fdbcbece87cd0440b5d7a1f2.zip |
usb: dwc3: gadget: END_TRANSFER before CLEAR_STALL command
According the programming guide (for all DWC3 IPs), when the driver
handles ClearFeature(halt) request, it should issue CLEAR_STALL command
_after_ the END_TRANSFER command completes. The END_TRANSFER command may
take some time to complete. So, delay the ClearFeature(halt) request
control status stage and wait for END_TRANSFER command completion
interrupt. Only after END_TRANSFER command completes that the driver
may issue CLEAR_STALL command.
Cc: stable@vger.kernel.org
Fixes: cb11ea56f37a ("usb: dwc3: gadget: Properly handle ClearFeature(halt)")
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Diffstat (limited to 'drivers/usb/dwc3/gadget.h')
-rw-r--r-- | drivers/usb/dwc3/gadget.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/gadget.h b/drivers/usb/dwc3/gadget.h index bd85eb7fa9ef..a7791cb827c4 100644 --- a/drivers/usb/dwc3/gadget.h +++ b/drivers/usb/dwc3/gadget.h @@ -113,6 +113,7 @@ int dwc3_gadget_ep0_set_halt(struct usb_ep *ep, int value); int dwc3_gadget_ep0_queue(struct usb_ep *ep, struct usb_request *request, gfp_t gfp_flags); int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value, int protocol); +void dwc3_ep0_send_delayed_status(struct dwc3 *dwc); /** * dwc3_gadget_ep_get_transfer_index - Gets transfer index from HW |