usb: dwc3: ep0: Avoid ENDXFER if already done from end_control_data
Currently, when the remove_requests function runs for ep0
it calls ep0_end_control_data as part of which endtransfer
is issued already. However, the remove_requests will proceed
further call stop_active_transfer for ep0 as part of which
endtransfer will be issued again. This is not expected as
issuing endtransfer back to back could put the controller
in an unknown state which might result in the controller
accessing invalid addresses leading to SMMU faults.
Fix this by clearing transfer started flag in end_control_data
for ep0 if ep_cmd was successful. If ep_cmd failed, then ignore
clearing the flag and exit.
Change-Id: I82ffdaca2f95d85d135f06c1cf3585fe713892c3
Signed-off-by:
Udipto Goswami <ugoswami@codeaurora.org>
Loading
Please register or sign in to comment