[ 14/37] rt2x00usb: fix indexes ordering on RX queue kick
From: Greg Kroah-Hartman
Date: Tue Jul 17 2012 - 20:04:38 EST
From: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>
3.4-stable review patch. If anyone has any objections, please let me know.
From: Stanislaw Gruszka <sgruszka@xxxxxxxxxx>
commit efd821182cec8c92babef6e00a95066d3252fda4 upstream.
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:
Reported-and-tested-by: Franco Miceli <fmiceli@xxxxxxxxxxxxxxxxxx>
Reported-and-tested-by: Tom Horsley <horsley1953@xxxxxxxxx>
Signed-off-by: Stanislaw Gruszka <sgruszka@xxxxxxxxxx>
Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
drivers/net/wireless/rt2x00/rt2x00usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -436,8 +436,8 @@ void rt2x00usb_kick_queue(struct data_qu
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/