usb: detect stop endpoint race using pending timer instead of counter. [1/1]
PD#SWPL-13177
Problem:
stop endpoint race
Solution:
A counter was used to find out if the stop endpoint completion raced with
the stop endpoint timeout timer. This was needed in case the stop ep
completion failed to delete the timer as it was running on anoter cpu.
The EP_STOP_CMD_PENDING flag was not enough as a new stop endpoint command
may be queued between the command completion and timeout function, which
would set the flag back.
Instead of the separate counter that was used we can detect the race by
checking both the STOP_EP_PENDING flag and timer_pending in the timeout
function.
Verify:
franklin
Change-Id: Ie958ffd530a6bd176d0cf451894a5bd4dece38da
Signed-off-by: Yue Wang <yue.wang@amlogic.com>