~ubuntu-branches/ubuntu/natty/linux-backports-modules-2.6.38/natty-updates

« back to all changes in this revision

Viewing changes to updates/compat-wireless-2.6.36/pending-stable/0040-ath9k-add-locking-for-starting-the-PCU-on-RX.patch

  • Committer: Bazaar Package Importer
  • Author(s): Tim Gardner, Tim Gardner
  • Date: 2011-06-08 10:44:09 UTC
  • Revision ID: james.westby@ubuntu.com-20110608104409-fnl8carkdo15bwsz
Tags: 2.6.38-10.6
[ Tim Gardner ]

Shorten compat-wireless package name to cw to accomodate
CDROM file name length restrictions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From 7583c550c3e635dcc61ab127c36ecefd59fb8dc8 Mon Sep 17 00:00:00 2001
2
 
From: Luis R. Rodriguez <lrodriguez@atheros.com>
3
 
Date: Wed, 20 Oct 2010 16:07:04 -0700
4
 
Subject: [PATCH 40/44] ath9k: add locking for starting the PCU on RX
5
 
 
6
 
There was some locking for starting some parts of
7
 
RX but not for starting the PCU. Include this otherwise
8
 
we can content against stopping the PCU.
9
 
 
10
 
This can potentially lead to races against different
11
 
buffers on the PCU which can lead to to the DMA RX
12
 
engine writing to buffers which are already freed.
13
 
 
14
 
This is part of a series that will help resolve the bug:
15
 
 
16
 
https://bugzilla.kernel.org/show_bug.cgi?id=14624
17
 
 
18
 
For more details about this issue refer to:
19
 
 
20
 
http://marc.info/?l=linux-wireless&m=128629803703756&w=2
21
 
 
22
 
Cc: stable@kernel.org
23
 
Cc: Ben Greear <greearb@candelatech.com>
24
 
Cc: Kyungwan Nam <kyungwan.nam@atheros.com>
25
 
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
26
 
Tested-by: Ben Greear <greearb@candelatech.com>
27
 
Signed-off-by: John W. Linville <linville@tuxdriver.com>
28
 
---
29
 
 drivers/net/wireless/ath/ath9k/recv.c |    7 ++++---
30
 
 1 files changed, 4 insertions(+), 3 deletions(-)
31
 
 
32
 
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
33
 
index e581b1f..b3c9baf 100644
34
 
--- a/drivers/net/wireless/ath/ath9k/recv.c
35
 
+++ b/drivers/net/wireless/ath/ath9k/recv.c
36
 
@@ -297,11 +297,11 @@ static void ath_edma_start_recv(struct ath_softc *sc)
37
 
        ath_rx_addbuffer_edma(sc, ATH9K_RX_QUEUE_LP,
38
 
                              sc->rx.rx_edma[ATH9K_RX_QUEUE_LP].rx_fifo_hwsize);
39
 
 
40
 
-       spin_unlock_bh(&sc->rx.rxbuflock);
41
 
-
42
 
        ath_opmode_init(sc);
43
 
 
44
 
        ath9k_hw_startpcureceive(sc->sc_ah, (sc->sc_flags & SC_OP_OFFCHANNEL));
45
 
+
46
 
+       spin_unlock_bh(&sc->rx.rxbuflock);
47
 
 }
48
 
 
49
 
 static void ath_edma_stop_recv(struct ath_softc *sc)
50
 
@@ -504,10 +504,11 @@ int ath_startrecv(struct ath_softc *sc)
51
 
        ath9k_hw_rxena(ah);
52
 
 
53
 
 start_recv:
54
 
-       spin_unlock_bh(&sc->rx.rxbuflock);
55
 
        ath_opmode_init(sc);
56
 
        ath9k_hw_startpcureceive(ah, (sc->sc_flags & SC_OP_OFFCHANNEL));
57
 
 
58
 
+       spin_unlock_bh(&sc->rx.rxbuflock);
59
 
+
60
 
        return 0;
61
 
 }
62
 
 
63
 
1.7.3.2.90.gd4c43
64