mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 04:42:04 -04:00
usb: dwc3: Issue ENDTRANSFER cmd on ep0 unconditionally
Consider a case where ep0 is not in setup stage and composition switch happens. Currently DWC3_DEPCMD_ENDTRANSFER command is not issued on ep0 which means that the transfers are not flushed out and driver clears the run/stop bit hence stopping the controller. Now as soon as driver sets the run/stop bit controller tries to access the trb from the previous session which is already unmapped resulting in SMMU fault. Fix this by unconditionally issuing DWC3_DEPCMD_ENDTRANSFER command on ep0. Although it is not specified in the data book but if we know for sure that we are anyway going to stop the controller then we can issue ENDTRANSFER command on ep0. Change-Id: Ic6ee570acc8926897d3b6042181a501a47438d92 Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
This commit is contained in:
parent
9a855e1c71
commit
42a90ced12
1 changed files with 1 additions and 1 deletions
|
|
@ -799,7 +799,7 @@ static void dwc3_remove_requests(struct dwc3 *dwc, struct dwc3_ep *dep)
|
|||
struct dwc3_request *req;
|
||||
int ret = -EINVAL;
|
||||
|
||||
if (dep->number == 0 && dwc->ep0state != EP0_SETUP_PHASE) {
|
||||
if (dep->number == 0) {
|
||||
unsigned int dir;
|
||||
|
||||
dbg_log_string("CTRLPEND", dwc->ep0state);
|
||||
|
|
|
|||
Loading…
Reference in a new issue