[kernel/f16] Add patch to fix ipw2200 (rhbz 783708)
Josh Boyer
jwboyer at fedoraproject.org
Tue Apr 24 12:53:35 UTC 2012
commit ebeee9684c467cc35e9be363532e4810ea6e4ba6
Author: Josh Boyer <jwboyer at redhat.com>
Date: Tue Apr 24 08:47:28 2012 -0400
Add patch to fix ipw2200 (rhbz 783708)
...ion-in-the-command-completion-acknowledge.patch | 69 ++++++++++++++++++++
kernel.spec | 11 +++-
2 files changed, 79 insertions(+), 1 deletions(-)
---
diff --git a/ipw2200-Fix-race-condition-in-the-command-completion-acknowledge.patch b/ipw2200-Fix-race-condition-in-the-command-completion-acknowledge.patch
new file mode 100644
index 0000000..3b7451f
--- /dev/null
+++ b/ipw2200-Fix-race-condition-in-the-command-completion-acknowledge.patch
@@ -0,0 +1,69 @@
+Driver incorrectly validates command completion: instead of waiting
+for a command to be acknowledged it continues execution. Most of the
+time driver gets acknowledge of the command completion in a tasklet
+before it executes the next one. But sometimes it sends the next
+command before it gets acknowledge for the previous one. In such a
+case one of the following error messages appear in the log:
+
+Failed to send SYSTEM_CONFIG: Already sending a command.
+Failed to send ASSOCIATE: Already sending a command.
+Failed to send TX_POWER: Already sending a command.
+
+After that you need to reload the driver to get it working again.
+
+This bug occurs during roammaping (reported by Sam Varshavchik)
+https://bugzilla.redhat.com/show_bug.cgi?id=738508
+and machine booting (reported by Tom Gundersen and Mads Kiilerich)
+https://bugs.archlinux.org/task/28097
+https://bugzilla.redhat.com/show_bug.cgi?id=802106
+
+This patch doesn't fix the delay issue during firmware load.
+But at least device now works as usual after boot.
+
+Cc: stable at kernel.org
+Signed-off-by: Stanislav Yakovlev <stas.yakovlev at gmail.com>
+---
+ drivers/net/wireless/ipw2x00/ipw2200.c | 13 ++++++++++++-
+ 1 files changed, 12 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c
+index 4130802..8cbafa5 100644
+--- a/drivers/net/wireless/ipw2x00/ipw2200.c
++++ b/drivers/net/wireless/ipw2x00/ipw2200.c
+@@ -2192,6 +2192,7 @@ static int __ipw_send_cmd(struct ipw_priv *priv, struct host_cmd *cmd)
+ {
+ int rc = 0;
+ unsigned long flags;
++ unsigned long now, end;
+
+ spin_lock_irqsave(&priv->lock, flags);
+ if (priv->status & STATUS_HCMD_ACTIVE) {
+@@ -2233,10 +2234,20 @@ static int __ipw_send_cmd(struct ipw_priv *priv, struct host_cmd *cmd)
+ }
+ spin_unlock_irqrestore(&priv->lock, flags);
+
++ now = jiffies;
++ end = now + HOST_COMPLETE_TIMEOUT;
++again:
+ rc = wait_event_interruptible_timeout(priv->wait_command_queue,
+ !(priv->
+ status & STATUS_HCMD_ACTIVE),
+- HOST_COMPLETE_TIMEOUT);
++ end - now);
++ if (rc < 0) {
++ now = jiffies;
++ if (time_before(now, end))
++ goto again;
++ rc = 0;
++ }
++
+ if (rc == 0) {
+ spin_lock_irqsave(&priv->lock, flags);
+ if (priv->status & STATUS_HCMD_ACTIVE) {
+--
+1.7.2.5
+
+--
+To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
+the body of a message to majordomo at vger.kernel.org
+More majordomo info at http://vger.kernel.org/majordomo-info.html
\ No newline at end of file
diff --git a/kernel.spec b/kernel.spec
index 5511e67..c618361 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -54,7 +54,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 2
+%global baserelease 3
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@@ -810,6 +810,9 @@ Patch22010: memblock-memblock-should-be-able-to-handle-zero-leng.patch
Patch22011: input-synaptics-fix-regression-with-image-sensor-trackpads.patch
+#rhbz 783708
+Patch22012: ipw2200-Fix-race-condition-in-the-command-completion-acknowledge.patch
+
# END OF PATCH DEFINITIONS
%endif
@@ -1511,6 +1514,9 @@ ApplyPatch memblock-memblock-should-be-able-to-handle-zero-leng.patch
ApplyPatch input-synaptics-fix-regression-with-image-sensor-trackpads.patch
+#rhbz 783708
+ApplyPatch ipw2200-Fix-race-condition-in-the-command-completion-acknowledge.patch
+
# END OF PATCH APPLICATIONS
%endif
@@ -2249,6 +2255,9 @@ fi
# and build.
%changelog
+* Tue Apr 24 2012 Josh Boyer <jwboyer at redhat.com>
+- Add patch to fix ipw2200 (rhbz 783708)
+
* Mon Apr 23 2012 Peter Hutterer <peter.hutterer at redhat.com>
- Fix regression on clickpads
More information about the scm-commits
mailing list