Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 38dbfd0a authored by Udipto Goswami's avatar Udipto Goswami
Browse files

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: default avatarUdipto Goswami <ugoswami@codeaurora.org>
parent 80cba7e4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment