]> Pileus Git - ~andy/linux/commit
rt2x00usb: fix indexes ordering on RX queue kick
authorStanislaw Gruszka <sgruszka@redhat.com>
Wed, 4 Jul 2012 11:10:02 +0000 (13:10 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 9 Jul 2012 19:01:02 +0000 (15:01 -0400)
commitefd821182cec8c92babef6e00a95066d3252fda4
treed3f3d2495ef1a7167c72fd74b2d154ea8256aac9
parentb3190466b0b6d336eddd10319c64a3ce3029b3ff
rt2x00usb: fix indexes ordering on RX queue kick

On rt2x00_dmastart() we increase index specified by Q_INDEX and on
rt2x00_dmadone() we increase index specified by Q_INDEX_DONE. So entries
between Q_INDEX_DONE and Q_INDEX are those we currently process in the
hardware. Entries between Q_INDEX and Q_INDEX_DONE are those we can
submit to the hardware.

According to that fix rt2x00usb_kick_queue(), as we need to submit RX
entries that are not processed by the hardware. It worked before only
for empty queue, otherwise was broken.

Note that for TX queues indexes ordering are ok. We need to kick entries
that have filled skb, but was not submitted to the hardware, i.e.
started from Q_INDEX_DONE and have ENTRY_DATA_PENDING bit set.

From practical standpoint this fixes RX queue stall, usually reproducible
in AP mode, like for example reported here:
https://bugzilla.redhat.com/show_bug.cgi?id=828824

Reported-and-tested-by: Franco Miceli <fmiceli@plan.ceibal.edu.uy>
Reported-and-tested-by: Tom Horsley <horsley1953@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00usb.c