Skip to content
Commit 2368623f authored by Tomasz Moń's avatar Tomasz Moń Committed by Henrik Brix Andersen
Browse files

drivers: udc_dwc2: Avoid IN endpoint dequeue race



Flushing TxFIFO is racing with actual use of the TxFIFO. The software
controls only one side of the race (flush trigger) while the host
controls the other side. Therefore, locking interrupts before flushing
TxFIFO is not protecting against the race condition.

Disable the endpoint on dequeue to make sure that TxFIFO flushing won't
conflict with host actions (because the endpoint would be forced to NAK
the IN tokens before the TxFIFO is flushed).

Signed-off-by: default avatarTomasz Moń <tomasz.mon@nordicsemi.no>
parent 4db14f83
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment