From: Kalle Valo Date: Tue, 30 Apr 2013 20:59:48 +0300 Subject: [ath9k-devel] [PATCH 01/10] ath10k: document spinlock usage In-Reply-To: <20130430175207.5523.2536.stgit@localhost6.localdomain6> (Kalle Valo's message of "Tue, 30 Apr 2013 20:52:07 +0300") References: <20130430175053.5523.85177.stgit@localhost6.localdomain6> <20130430175207.5523.2536.stgit@localhost6.localdomain6> Message-ID: <87r4hrj3vv.fsf@kamboji.qca.qualcomm.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org Kalle Valo writes: > Checkpatch warned that spinlocks are not documented. > > Signed-off-by: Kalle Valo BTW, please send me feedback (or better yet patches) for the FIXME issues below. I didn't have time to go through all the locking in ath10k. > --- a/drivers/net/wireless/ath/ath10k/htt.h > +++ b/drivers/net/wireless/ath/ath10k/htt.h > @@ -1255,12 +1255,15 @@ struct ath10k_htt { > */ > struct timer_list refill_retry_timer; > > + /* FIXME: document what this protects */ > spinlock_t lock; > } rx_ring; > > unsigned int prefetch_len; > > + /* FIXME: document what this protects */ > spinlock_t tx_lock; > + > struct sk_buff *pending_tx[HTT_MAX_NUM_PENDING_TX]; > DECLARE_BITMAP(used_msdu_ids, HTT_MAX_NUM_PENDING_TX); > wait_queue_head_t empty_tx_wq; > diff --git a/drivers/net/wireless/ath/ath10k/pci.h b/drivers/net/wireless/ath/ath10k/pci.h > index e22f764..e109a45 100644 > --- a/drivers/net/wireless/ath/ath10k/pci.h > +++ b/drivers/net/wireless/ath/ath10k/pci.h > @@ -224,11 +228,13 @@ struct ath10k_pci { > /* Copy Engine used for Diagnostic Accesses */ > struct ce_state *ce_diag; > > + /* FIXME: document what this really protects */ > spinlock_t ce_lock; > > /* Map CE id to ce_state */ > struct ce_state *ce_id_to_state[CE_COUNT_MAX]; > > + /* makes sure that dummy reads are atomic */ > spinlock_t hw_v1_workaround_lock; > }; -- Kalle Valo