]> git.baikalelectronics.ru Git - kernel.git/commit
ath5k: Keep last descriptor in queue
authorBruno Randolf <br1@einfach.org>
Fri, 17 Sep 2010 02:37:07 +0000 (11:37 +0900)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 21 Sep 2010 15:05:15 +0000 (11:05 -0400)
commit6ad4bf169e781eeb7923b2af440f595f31db4d4f
tree8cb08ec25b181921f9912f72cde3762549a3c520
parent97e22acb5bd8f01fffadcee3fdc2d7595afa5813
ath5k: Keep last descriptor in queue

If we return a TX descriptor to the pool of available descriptors, while a
queues TXDP still points to it we could potentially run into all sorts of
troube.

It has been suggested that there is hardware which can set the descriptors
done bit before it reads ds_link and moves on to the next descriptor. While the
documentation says this is not true for newer chipsets (the descriptor contents
are copied to some internal memory), we don't know about older hardware.

To be safe, we always keep the last descriptor in the queue, and avoid dangling
TXDP pointers. Unfortunately this does not fully resolve the problem - queues
still get stuck!

This is similar to what ath9k does.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath5k/base.c