diff options
author | 2015-03-02 14:46:02 +0000 | |
---|---|---|
committer | 2015-03-02 14:46:02 +0000 | |
commit | d25f24109a16c100e8600051ac32fbfd8fe03540 (patch) | |
tree | ea43b254a8e22b4f9bcb8fba14650d88f3d16ecc /lib/libc | |
parent | gethostbyname(3) would fail when more than 16 addrs/aliases were returned. (diff) | |
download | wireguard-openbsd-d25f24109a16c100e8600051ac32fbfd8fe03540.tar.xz wireguard-openbsd-d25f24109a16c100e8600051ac32fbfd8fe03540.zip |
Rework ath(4) USB firmware command handling.
The previous code was racy and could dead-lock the USB task thread when a
firmware command timed out (e.g. because the user pulled out the device).
Handle this condition by marking the device as dying as soon as the interrupt
handler gets an IOERROR and making sleeping firmware command threads check
for a dying device when waking up.
Ensure that no thread will try to send a command before the previous one
has completed. There is only a single xfer data structure for firmware
command transfers and reusing an in-flight xfer will give the USB stack
curly toenails ("xfer not free").
Allow up to ATHN_USB_HOST_CMD_RING_COUNT firmware commands to be enqueued
on the command ring, rather than just one. Use standard usdb_wait_task()
when waiting for command ring completion instead of hand-rolled tsleep()s.
discussed with and ok mpi@
Diffstat (limited to 'lib/libc')
0 files changed, 0 insertions, 0 deletions