Search Linux Wireless

Re: [PATCH 3/6] ath9k: rename rxflushlock to pcu_lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 20, 2010 at 11:03 PM, Senthil Balasubramanian
<senthilkumar@xxxxxxxxxxx> wrote:
> On Thu, Oct 21, 2010 at 04:37:05AM +0530, Luis R. Rodriguez wrote:
>> The real way to lock RX is to contend on the PCU
>> and reset, this will be fixed in the next patch but for
>> now just do the renames so that the next patch which changes
>> the locking order is crystal clear.
>>
>> This is part of a series that will help resolve the bug:
>>
>> https://bugzilla.kernel.org/show_bug.cgi?id=14624
>>
>> For more details about this issue refer to:
>>
>> http://marc.info/?l=linux-wireless&m=128629803703756&w=2
>>
>> Cc: stable@xxxxxxxxxx
>> Cc: Ben Greear <greearb@xxxxxxxxxxxxxxx>
>> Cc: Kyungwan Nam <kyungwan.nam@xxxxxxxxxxx>
>> Signed-off-by: Luis R. Rodriguez <lrodriguez@xxxxxxxxxxx>
>> ---
>> Âdrivers/net/wireless/ath/ath9k/ath9k.h | Â Â2 +-
>> Âdrivers/net/wireless/ath/ath9k/main.c Â| Â Â4 ++--
>> Âdrivers/net/wireless/ath/ath9k/recv.c Â| Â Â6 +++---
>> Â3 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
>> index 0f0bc54..81fed83 100644
>> --- a/drivers/net/wireless/ath/ath9k/ath9k.h
>> +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
>> @@ -309,7 +309,7 @@ struct ath_rx {
>> Â Â Â u8 rxotherant;
>> Â Â Â u32 *rxlink;
>> Â Â Â unsigned int rxfilter;
>> - Â Â spinlock_t rxflushlock;
>> + Â Â spinlock_t pcu_lock;
>> Â Â Â spinlock_t rxbuflock;
>> Â Â Â struct list_head rxbuf;
>> Â Â Â struct ath_descdma rxdma;
>> diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
>> index dcd94ba..37f18ef 100644
>> --- a/drivers/net/wireless/ath/ath9k/main.c
>> +++ b/drivers/net/wireless/ath/ath9k/main.c
>> @@ -609,7 +609,7 @@ void ath9k_tasklet(unsigned long data)
>> Â Â Â Â Â Â Â rxmask = (ATH9K_INT_RX | ATH9K_INT_RXEOL | ATH9K_INT_RXORN);
>>
>> Â Â Â if (status & rxmask) {
>> - Â Â Â Â Â Â spin_lock_bh(&sc->rx.rxflushlock);
>> + Â Â Â Â Â Â spin_lock_bh(&sc->rx.pcu_lock);
> no need to disable bh as you are already in tasklet. I understand that the
> existing code itself was doing this and I thought of fixing that anyway.
> Can you plese fix this as well with this patch?

Nah, I rather this be a separate patch, which you can test and send yourself :)

>>
>> Â Â Â Â Â Â Â /* Check for high priority Rx first */
>> Â Â Â Â Â Â Â if ((ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) &&
>> @@ -617,7 +617,7 @@ void ath9k_tasklet(unsigned long data)
>> Â Â Â Â Â Â Â Â Â Â Â ath_rx_tasklet(sc, 0, true);
>>
>> Â Â Â Â Â Â Â ath_rx_tasklet(sc, 0, false);
>> - Â Â Â Â Â Â spin_unlock_bh(&sc->rx.rxflushlock);
>> + Â Â Â Â Â Â spin_unlock_bh(&sc->rx.pcu_lock);
> here also. spin_lock() is sufficient.

Ditto.

 Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux