summaryrefslogtreecommitdiffstats
path: root/sys/dev/virtio/virtqueue.h
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2011-11-18 05:06:30 +0000
committeradrian <adrian@FreeBSD.org>2011-11-18 05:06:30 +0000
commit7b8778fe5a226bee40cd88fc68926e898e9bd8f7 (patch)
tree5bf2fd2e0202a7d4463aa93eec3ebc5b9b097819 /sys/dev/virtio/virtqueue.h
parent1a26b28a9b13239c0dcae74ac1f94a5969fd2b3c (diff)
downloadFreeBSD-src-7b8778fe5a226bee40cd88fc68926e898e9bd8f7.zip
FreeBSD-src-7b8778fe5a226bee40cd88fc68926e898e9bd8f7.tar.gz
Flesh out some slightly dirty reset/channel change serialisation code
for the ath(4) driver. Currently, there's nothing stopping reset, channel change and general TX/RX from overlapping with each other. This wasn't a big deal with pre-11n traffic as it just results in some dropped frames. It's possible this may have also caused some inconsistencies and badly-setup hardware. Since locks can't be held across all of this (the Linux solution) due to LORs with the network stack locks, some state counter variables are used to track what parts of the code the driver is currently in. When the hardware is being reset, it disables the taskqueue and waits for pending interrupts, tx, rx and tx completion before it begins the reset or channel change. TX and RX both abort if called during an active reset or channel change. Finally, the reset path now doesn't flush frames if ATH_RESET_NOLOSS is set. Instead, completed TX and RX frames are passed back up to net80211 before the reset occurs. This is not without problems: * Raw frame xmit are just dropped, rather than placed on a queue. The net80211 stack should be the one which queues these frames rather than the driver. * It's all very messy. It'd be better if these hardware operations were serialised on some kind of work queue, rather than hoping they can be run in parallel. * The taskqueue block/unblock may occur in parallel with the newstate() function - which shuts down the taskqueue and restarts it once the new state is known. It's likely these operations should be refcounted so the taskqueue is restored once no other areas in the code wish to suspend operations. * .. interrupt disable/enable should likely be refcounted as well. With this work, the driver does not drop frames during stuck beacon or fatal errors and thus 11n traffic continues to run correctly. Default and full resets however do still drop frames and it's possible this may occur, causing traffic loss and session stalls. Sponsored by: Hobnob, Inc.
Diffstat (limited to 'sys/dev/virtio/virtqueue.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud