summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0017-brcmsmac-fix-tx-queue-flush-infinite-loop.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0017-brcmsmac-fix-tx-queue-flush-infinite-loop.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0017-brcmsmac-fix-tx-queue-flush-infinite-loop.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0017-brcmsmac-fix-tx-queue-flush-infinite-loop.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0017-brcmsmac-fix-tx-queue-flush-infinite-loop.patch
new file mode 100644
index 00000000..78e25577
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0017-brcmsmac-fix-tx-queue-flush-infinite-loop.patch
@@ -0,0 +1,53 @@
1From 786a655cc87f51dcedae8b03d880d3b507aeffc3 Mon Sep 17 00:00:00 2001
2From: Stanislaw Gruszka <sgruszka@redhat.com>
3Date: Tue, 17 Jan 2012 12:38:50 +0100
4Subject: [PATCH 17/90] brcmsmac: fix tx queue flush infinite loop
5
6commit f96b08a7e6f69c0f0a576554df3df5b1b519c479 upstream.
7
8This patch workaround live deadlock problem caused by infinite loop
9in brcms_c_wait_for_tx_completion(). I do not consider the patch as
10the proper fix, which should fix the real reason of tx queue flush
11failure, but patch helps with system lockup.
12
13Reference:
14https://bugzilla.kernel.org/show_bug.cgi?id=42576
15
16Reported-and-tested-by: Patrick <ragamuffin@datacomm.ch>
17Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
18Signed-off-by: John W. Linville <linville@tuxdriver.com>
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20---
21 drivers/net/wireless/brcm80211/brcmsmac/main.c | 10 +++++++++-
22 1 files changed, 9 insertions(+), 1 deletions(-)
23
24diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
25index 510e9bb..453f58e 100644
26--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
27+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
28@@ -8217,13 +8217,21 @@ int brcms_c_get_curband(struct brcms_c_info *wlc)
29
30 void brcms_c_wait_for_tx_completion(struct brcms_c_info *wlc, bool drop)
31 {
32+ int timeout = 20;
33+
34 /* flush packet queue when requested */
35 if (drop)
36 brcmu_pktq_flush(&wlc->pkt_queue->q, false, NULL, NULL);
37
38 /* wait for queue and DMA fifos to run dry */
39- while (!pktq_empty(&wlc->pkt_queue->q) || brcms_txpktpendtot(wlc) > 0)
40+ while (!pktq_empty(&wlc->pkt_queue->q) || brcms_txpktpendtot(wlc) > 0) {
41 brcms_msleep(wlc->wl, 1);
42+
43+ if (--timeout == 0)
44+ break;
45+ }
46+
47+ WARN_ON_ONCE(timeout == 0);
48 }
49
50 void brcms_c_set_beacon_listen_interval(struct brcms_c_info *wlc, u8 interval)
51--
521.7.7.4
53