summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3/core.h
diff options
context:
space:
mode:
authorWesley Cheng <quic_wcheng@quicinc.com>2022-09-01 12:36:21 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-07 16:26:26 +0200
commit2b2da6574e77ebf83c0df6d8b838bc37764c4bfa (patch)
tree7b5923d829149b0a0b27890cf669c89afc325f61 /drivers/usb/dwc3/core.h
parent787f51f210ebe5d7d5e4c8101b148f0018e9c409 (diff)
downloadlinux-2b2da6574e77ebf83c0df6d8b838bc37764c4bfa.tar.gz
linux-2b2da6574e77ebf83c0df6d8b838bc37764c4bfa.tar.bz2
linux-2b2da6574e77ebf83c0df6d8b838bc37764c4bfa.zip
usb: dwc3: Avoid unmapping USB requests if endxfer is not complete
If DWC3_EP_DELAYED_STOP is set during stop active transfers, then do not continue attempting to unmap request buffers during dwc3_remove_requests(). This can lead to SMMU faults, as the controller has not stopped the processing of the TRB. Defer this sequence to the EP0 out start, which ensures that there are no pending SETUP transactions before issuing the endxfer. Reviewed-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com> Link: https://lore.kernel.org/r/20220901193625.8727-2-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc3/core.h')
-rw-r--r--drivers/usb/dwc3/core.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index 4fe4287dc934..7c9368145f37 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -1560,6 +1560,7 @@ int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep, unsigned int cmd,
int dwc3_send_gadget_generic_command(struct dwc3 *dwc, unsigned int cmd,
u32 param);
void dwc3_gadget_clear_tx_fifos(struct dwc3 *dwc);
+void dwc3_remove_requests(struct dwc3 *dwc, struct dwc3_ep *dep, int status);
#else
static inline int dwc3_gadget_init(struct dwc3 *dwc)
{ return 0; }