Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

firmware: fix race conditions in control out transfers (-2 bytes XRAM). #703

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Sep 27, 2024

  1. firmware: fix race conditions in control out transfers (-2 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 whitequark/libfx2#18 for more
    details.
    purdeaandrei committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    b1e7539 View commit details
    Browse the repository at this point in the history