Please sign in to comment.
softusb: remove rx_pending vs. rx_active race
When testing rx_pending and rx_active in a loop, the following race can have happened: - we test rx_pending and find it clear - the packet's last byte finishes and rx_pending is set - the EOP is detected and rx_active is cleared - we test rx_active and conclude that the packet has terminated Thus, we don't reach the test of rx_pending and miss the packet's last byte. This patch changes the SIE_RX_PENDING register such that it allows both rx_active and rx_pending to be retrieved atomically.
- Loading branch information...
Showing with 11 additions and 5 deletions.