From: Luca Coelho <luca@coelho.fi>
To: linux-wireless@vger.kernel.org
Cc: kvalo@codeaurora.org, Johannes Berg <johannes.berg@intel.com>,
Luca Coelho <luciano.coelho@intel.com>
Subject: [PATCH 1/7] iwlwifi: pcie: mark command queue lock with separate lockdep class
Date: Wed, 19 Oct 2016 10:27:20 +0300 [thread overview]
Message-ID: <20161019072726.22018-2-luca@coelho.fi> (raw)
In-Reply-To: <20161019072726.22018-1-luca@coelho.fi>
From: Johannes Berg <johannes.berg@intel.com>
Emmanuel reports that when CMD_WANT_ASYNC_CALLBACK is used by mvm,
the callback will be called with the command queue lock held, and
mvm will try to stop all (other) TX queues, which acquires their
locks - this caused a false lockdep recursive locking report.
Suppress this report by marking the command queue lock with a new,
separate, lock class so lockdep can tell the difference between
the two types of queues.
Fixes: 156f92f2b471 ("iwlwifi: block the queues when we send ADD_STA for uAPSD")
Reported-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
index e9a278b..5f840f1 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
@@ -592,6 +592,7 @@ error:
static int iwl_pcie_txq_init(struct iwl_trans *trans, struct iwl_txq *txq,
int slots_num, u32 txq_id)
{
+ struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
int ret;
txq->need_update = false;
@@ -606,6 +607,13 @@ static int iwl_pcie_txq_init(struct iwl_trans *trans, struct iwl_txq *txq,
return ret;
spin_lock_init(&txq->lock);
+
+ if (txq_id == trans_pcie->cmd_queue) {
+ static struct lock_class_key iwl_pcie_cmd_queue_lock_class;
+
+ lockdep_set_class(&txq->lock, &iwl_pcie_cmd_queue_lock_class);
+ }
+
__skb_queue_head_init(&txq->overflow_q);
/*
--
2.9.3
next prev parent reply other threads:[~2016-10-19 14:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-19 7:27 [PATCH 0/7] iwlwifi: updates intended for v4.9 2016-10-19 Luca Coelho
2016-10-19 7:27 ` Luca Coelho [this message]
2016-10-19 7:27 ` [PATCH 2/7] iwlwifi: mvm: use ssize_t for len in iwl_debugfs_mem_read() Luca Coelho
2016-10-19 7:27 ` [PATCH 3/7] iwlwifi: mvm: fix d3_test with unified D0/D3 images Luca Coelho
2016-10-19 7:27 ` [PATCH 4/7] iwlwifi: mvm: comply with fw_restart mod param on suspend Luca Coelho
2016-10-19 7:27 ` [PATCH 5/7] iwlwifi: mvm: wake the wait queue when the RX sync counter is zero Luca Coelho
2016-10-19 7:27 ` [PATCH 6/7] iwlwifi: pcie: fix SPLC structure parsing Luca Coelho
2016-10-19 7:27 ` [PATCH 7/7] iwlwifi: mvm: fix netdetect starting/stopping for unified images Luca Coelho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161019072726.22018-2-luca@coelho.fi \
--to=luca@coelho.fi \
--cc=johannes.berg@intel.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=luciano.coelho@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox