[kernel] Patch from Stanislaw Gruszka to fix rt2x00 USB access point (rhbz 828824)

Josh Boyer jwboyer at fedoraproject.org
Wed Jul 4 15:35:12 UTC 2012


commit 83ef0f3582bd023d86bbfb401ebe61b55f6e4366
Author: Josh Boyer <jwboyer at redhat.com>
Date:   Wed Jul 4 11:30:05 2012 -0400

    Patch from Stanislaw Gruszka to fix rt2x00 USB access point (rhbz 828824)

 kernel.spec                                        |   11 +++++-
 ...usb-fix-indexes-ordering-on-RX-queue-kick.patch |   43 ++++++++++++++++++++
 2 files changed, 53 insertions(+), 1 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index a607851..da8455a 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -62,7 +62,7 @@ Summary: The Linux kernel
 # For non-released -rc kernels, this will be appended after the rcX and
 # gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
 #
-%global baserelease 1
+%global baserelease 2
 %global fedora_build %{baserelease}
 
 # base_sublevel is the kernel version we're starting with and patching
@@ -742,6 +742,9 @@ Patch22000: weird-root-dentry-name-debug.patch
 #selinux ptrace child permissions
 Patch22001: selinux-apply-different-permission-to-ptrace-child.patch
 
+#rhbz 828824
+Patch22043: rt2x00usb-fix-indexes-ordering-on-RX-queue-kick.patch
+
 # END OF PATCH DEFINITIONS
 
 %endif
@@ -1430,6 +1433,9 @@ ApplyPatch selinux-apply-different-permission-to-ptrace-child.patch
 #Highbank clock functions
 ApplyPatch highbank-export-clock-functions.patch 
 
+#rhbz 828824
+ApplyPatch rt2x00usb-fix-indexes-ordering-on-RX-queue-kick.patch
+
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -2286,6 +2292,9 @@ fi
 #                 ||----w |
 #                 ||     ||
 %changelog
+* Wed Jul 4 2012 Josh Boyer <jwboyer at redhat.com>
+- Patch from Stanislaw Gruszka to fix rt2x00 USB access point (rhbz 828824)
+
 * Tue Jul 03 2012 Justin M. Forbes <jforbes at redhat.com> - 3.5.0-0.rc5.git1.1
 - Linux v3.5-rc5-6-g9d4056a
 
diff --git a/rt2x00usb-fix-indexes-ordering-on-RX-queue-kick.patch b/rt2x00usb-fix-indexes-ordering-on-RX-queue-kick.patch
new file mode 100644
index 0000000..76b83cc
--- /dev/null
+++ b/rt2x00usb-fix-indexes-ordering-on-RX-queue-kick.patch
@@ -0,0 +1,43 @@
+From e899a84a6e9bec0ce653713a48ca121cd754430c Mon Sep 17 00:00:00 2001
+From: Stanislaw Gruszka <sgruszka at redhat.com>
+Date: Mon, 2 Jul 2012 09:42:14 +0200
+Subject: [PATCH] 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.
+strted from Q_INDEX_DONE and have ENTRY_DATA_PENDING bit set.
+
+From practical standpoint this patch fixes AP mode connection hangs.
+
+Signed-off-by: Stanislaw Gruszka <sgruszka at redhat.com>
+---
+ drivers/net/wireless/rt2x00/rt2x00usb.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c
+index d357d1e..74ecc33 100644
+--- a/drivers/net/wireless/rt2x00/rt2x00usb.c
++++ b/drivers/net/wireless/rt2x00/rt2x00usb.c
+@@ -436,8 +436,8 @@ void rt2x00usb_kick_queue(struct data_queue *queue)
+ 	case QID_RX:
+ 		if (!rt2x00queue_full(queue))
+ 			rt2x00queue_for_each_entry(queue,
+-						   Q_INDEX_DONE,
+ 						   Q_INDEX,
++						   Q_INDEX_DONE,
+ 						   NULL,
+ 						   rt2x00usb_kick_rx_entry);
+ 		break;
+-- 
+1.7.1
+


More information about the scm-commits mailing list