Skip to content
Commit e6874a0c authored by Andy Ross's avatar Andy Ross Committed by Anas Nashif
Browse files

usb_dw_dc: Fix locking correctness



There is no particular reason this spot in usb_dw_tx() cannot be
reached by racing threads on the same endpoint, though existing API
usage in the tree is all unithreaded.  The FIFO state read at the top
of the function must still be true at the bottom or else the packet
byte count will be corrupt.

Also, as described in an existing comment, the databook has some
scary-sounding warnings about access to the registers during FIFO
operations, even if they "should" be on separate endpoints and
unrelated.

Signed-off-by: default avatarAndy Ross <andrew.j.ross@intel.com>
parent 91a4397e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment