Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers: udc_dwc2: Workaround endpoint disable race condition
Endpoint disable function is racing against bus traffic. If the bus traffic leads to transfer completion immediately before the endpoint disable is executed, then the transfer complete interrupt will remain set when the endpoint is disabled. For OUT endpoints this leads to "No buffer for ep" errors, while for IN endpoint this can lead to double buffer pull which causes assertion failure. The proper solution would be to change endpoint disable to not actually wait for the individual events (and accept that the endpoint may not need to be disabled because the transfer can just finish). For the time being workaround the issue by clearing XferCompl bit on endpoint disable. Signed-off-by: Tomasz Moń <[email protected]>
- Loading branch information