firmware: fix race conditions in control out trans...
by
Purdea Andrei
1 year 1 month
firmware: fix race conditions in control out transfers (-3 bytes XRAM).
Before this change, the EP0BUF buffer used by control out transfers
could be overwritten by new control transfers before the firmware is
finished processing the previous control transfer.
The easiest way to illustrate this problem would be to run in a
different terminal the following:
```bash
while true; do lsusb -v -d 20b7:9db1 > /dev/null; done
```
While this is running, glasglow is completely unusable.
Presumably even a single lsusb run could cause corruption, if it
happens to be issued at the wrong time.
With this change glasgow is now usable, even if the above loop is
running.
Please see https://github.com/whitequark/libfx2/pull/18 for more
details.