From: Kalle Valo Date: Tue, 30 Apr 2013 20:52:07 +0300 Subject: [ath9k-devel] [PATCH 01/10] ath10k: document spinlock usage In-Reply-To: <20130430175053.5523.85177.stgit@localhost6.localdomain6> References: <20130430175053.5523.85177.stgit@localhost6.localdomain6> Message-ID: <20130430175207.5523.2536.stgit@localhost6.localdomain6> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org Checkpatch warned that spinlocks are not documented. Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath10k/htc.h | 1 + drivers/net/wireless/ath/ath10k/htt.h | 3 +++ drivers/net/wireless/ath/ath10k/pci.h | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/htc.h b/drivers/net/wireless/ath/ath10k/htc.h index cf97bde..f2ba51d 100644 --- a/drivers/net/wireless/ath/ath10k/htc.h +++ b/drivers/net/wireless/ath/ath10k/htc.h @@ -339,6 +339,7 @@ struct ath10k_htc { struct ath10k *ar; struct ath10k_htc_ep endpoint[ATH10K_HTC_EP_COUNT]; + /* protects endpoint and stopping fields */ spinlock_t tx_lock; struct ath10k_htc_ops htc_ops; diff --git a/drivers/net/wireless/ath/ath10k/htt.h b/drivers/net/wireless/ath/ath10k/htt.h index be9dc72..77a3017 100644 --- 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 @@ -171,6 +171,7 @@ struct hif_ce_pipe_info { size_t buf_sz; + /* protects compl_free and num_send_allowed */ spinlock_t pipe_lock; /* List of free CE completion slots */ @@ -211,7 +212,10 @@ struct ath10k_pci { /* List of CE completions to be processed */ struct list_head compl_process; + + /* protects compl_processing and compl_process */ spinlock_t compl_lock; + bool compl_processing; struct hif_ce_pipe_info pipe_info[CE_COUNT_MAX]; @@ -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; };