2010-04-24 04:37:58

by Jongman Heo

[permalink] [raw]
Subject: [PATCH] ath9k: use spin_lock_bh() instead of spin_lock() in ath_tid_drain()

commit a9f042cb ("ath9k: fix lockdep warning when unloading module")
changed spin_[un]lock() to
spin_[un]lock_bh() in ath_tx_node_cleanup(), but didn't change those
in ath_tid_drain().

Signed-off-by: Jongman Heo <[email protected]>

diff --git a/drivers/net/wireless/ath/ath9k/xmit.c
b/drivers/net/wireless/ath/ath9k/xmit.c
index 294b486..daf073b 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -235,9 +235,9 @@ static void ath_tid_drain(struct ath_softc *sc,
struct ath_txq *txq,
if (bf_isretried(bf))
ath_tx_update_baw(sc, tid, bf->bf_seqno);

- spin_unlock(&txq->axq_lock);
+ spin_unlock_bh(&txq->axq_lock);
ath_tx_complete_buf(sc, bf, txq, &bf_head, 0, 0);
- spin_lock(&txq->axq_lock);
+ spin_lock_bh(&txq->axq_lock);
}

tid->seq_next = tid->seq_start;


2010-04-24 10:52:03

by Ming Lei

[permalink] [raw]
Subject: Re: [PATCH] ath9k: use spin_lock_bh() instead of spin_lock() in ath_tid_drain()

2010/4/24 Jongman Heo <[email protected]>:
> commit a9f042cb ("ath9k: fix lockdep warning when unloading module")
> changed spin_[un]lock() to
> spin_[un]lock_bh() in ath_tx_node_cleanup(), but didn't change those
> in ath_tid_drain().

Did you see any lockdep warning due to ath_tid_drain?

It is not necessary since bh has been disabled before calling
ath_tid_drain.


--
Lei Ming