All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org,
	Sara Sharon <sara.sharon@intel.com>,
	Luca Coelho <luciano.coelho@intel.com>
Subject: [PATCH 10/18] iwlwifi: pcie: lock txq a bit later in reclaim code
Date: Fri, 14 Dec 2018 22:29:37 +0200	[thread overview]
Message-ID: <20181214202945.32375-11-luca@coelho.fi> (raw)
In-Reply-To: <20181214202945.32375-1-luca@coelho.fi>

From: Sara Sharon <sara.sharon@intel.com>

In reclaim code, we don't need to take the queue lock for
waking the queue. The code section is executed only when
the tx path is stopped, and since the reclaim path is not
executed in parallel to itself, no one can update the queue
pointers, and accessing them is safe without a lock.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
index 3d53842ee60e..ee990a7a5411 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
@@ -1160,10 +1160,11 @@ void iwl_trans_pcie_reclaim(struct iwl_trans *trans, int txq_id, int ssn,
 			 */
 			iwl_trans_tx(trans, skb, dev_cmd_ptr, txq_id);
 		}
-		spin_lock_bh(&txq->lock);
 
 		if (iwl_queue_space(trans, txq) > txq->low_mark)
 			iwl_wake_queue(trans, txq);
+
+		spin_lock_bh(&txq->lock);
 	}
 
 	if (txq->read_ptr == txq->write_ptr) {
-- 
2.19.2


  parent reply	other threads:[~2018-12-14 20:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-14 20:29 [PATCH 00/18] iwlwifi: updates intended for v4.21 2018-12-14 Luca Coelho
2018-12-14 20:29 ` [PATCH 01/18] iwlwifi: pcie: use iwl_tx_cmd_gen2 and not iwl_tx_cmd Luca Coelho
2018-12-14 20:29 ` [PATCH 02/18] iwlwifi: mvm: remove dead code Luca Coelho
2018-12-14 20:29 ` [PATCH 03/18] iwlwifi: mvm: remove pointless NULL assignment Luca Coelho
2018-12-14 20:29 ` [PATCH 04/18] iwlwifi: mvm: cleanup iwl_mvm_tx_skb_non_sta Luca Coelho
2018-12-14 20:29 ` [PATCH 05/18] iwlwifi: mvm: fix setting HE ppe FW config Luca Coelho
2018-12-14 20:29 ` [PATCH 06/18] [BUGFIXiwlwifi: make MVM and DVM depend on MAC80211 Luca Coelho
2018-12-18 16:17   ` Kalle Valo
2018-12-19 10:24     ` Luca Coelho
2018-12-14 20:29 ` [PATCH 07/18] iwlwifi: split HE capabilities between AP and STA Luca Coelho
2018-12-14 20:29 ` [PATCH 08/18] iwlwifi: mvm: handle RX no data notification Luca Coelho
2018-12-14 20:29 ` [PATCH 09/18] iwlwifi: mvm: take station lock later in the code Luca Coelho
2018-12-14 20:29 ` Luca Coelho [this message]
2018-12-14 20:29 ` [PATCH 11/18] iwlwifi: mvm: clean up SSN incrementation Luca Coelho
2018-12-14 20:29 ` [PATCH 12/18] iwlwifi: wrt: add rt status and num of rx/tx fifos to dump Luca Coelho
2018-12-14 20:29 ` [PATCH 13/18] iwlwifi: remove unused and wrong PHY_CFG_* macros Luca Coelho
2018-12-14 20:29 ` [PATCH 14/18] iwlwifi: mvm: set TWT responder capability bit in 11AX SoftAP mode Luca Coelho
2018-12-14 20:29 ` [PATCH 15/18] iwlwifi: mvm: fix spelling mistake "Recieved" -> "Received" Luca Coelho
2018-12-14 20:29 ` [PATCH 16/18] iwlwifi: mvm: d3: use struct_size() in kzalloc() Luca Coelho
2018-12-14 20:29 ` [PATCH 17/18] iwlwifi: dbg: add debug data to warning Luca Coelho
2018-12-14 20:29 ` [PATCH 18/18] iwlwifi: bump the API version to 43 for 9000 and 22000 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=20181214202945.32375-11-luca@coelho.fi \
    --to=luca@coelho.fi \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luciano.coelho@intel.com \
    --cc=sara.sharon@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.