linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Emmanuel Grumbach <egrumbach@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: Avri Altman <avri.altman@intel.com>,
	Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Subject: [PATCH 27/36] iwlwifi: trans: configure the scheduler enable register
Date: Wed,  3 Sep 2014 22:56:15 +0300	[thread overview]
Message-ID: <1409774184-24665-27-git-send-email-egrumbach@gmail.com> (raw)
In-Reply-To: <540771E5.6080908@gmail.com>

From: Avri Altman <avri.altman@intel.com>

Currently the firmware is handling this, but that is wrong as it then
needs to assume a certain command queue, therefore this should be in
the driver; add it here so it can be removed from the firmware in the
future.

Signed-off-by: Avri Altman <avri.altman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-prph.h | 1 +
 drivers/net/wireless/iwlwifi/iwl-scd.h  | 6 ++++++
 drivers/net/wireless/iwlwifi/pcie/tx.c  | 8 ++++++++
 3 files changed, 15 insertions(+)

diff --git a/drivers/net/wireless/iwlwifi/iwl-prph.h b/drivers/net/wireless/iwlwifi/iwl-prph.h
index 47033a3..9e15273 100644
--- a/drivers/net/wireless/iwlwifi/iwl-prph.h
+++ b/drivers/net/wireless/iwlwifi/iwl-prph.h
@@ -281,6 +281,7 @@
 #define SCD_CHAINEXT_EN		(SCD_BASE + 0x244)
 #define SCD_AGGR_SEL		(SCD_BASE + 0x248)
 #define SCD_INTERRUPT_MASK	(SCD_BASE + 0x108)
+#define SCD_EN_CTRL		(SCD_BASE + 0x254)
 
 static inline unsigned int SCD_QUEUE_WRPTR(unsigned int chnl)
 {
diff --git a/drivers/net/wireless/iwlwifi/iwl-scd.h b/drivers/net/wireless/iwlwifi/iwl-scd.h
index 5f099d4..6c622b2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scd.h
+++ b/drivers/net/wireless/iwlwifi/iwl-scd.h
@@ -109,4 +109,10 @@ static inline void iwl_scd_deactivate_fifos(struct iwl_trans *trans)
 {
 	iwl_write_prph(trans, SCD_TXFACT, 0);
 }
+
+static inline void iwl_scd_enable_set_active(struct iwl_trans *trans,
+					     u32 value)
+{
+	iwl_write_prph(trans, SCD_EN_CTRL, value);
+}
 #endif
diff --git a/drivers/net/wireless/iwlwifi/pcie/tx.c b/drivers/net/wireless/iwlwifi/pcie/tx.c
index a24c1df..9fdfed8 100644
--- a/drivers/net/wireless/iwlwifi/pcie/tx.c
+++ b/drivers/net/wireless/iwlwifi/pcie/tx.c
@@ -1078,6 +1078,10 @@ void iwl_trans_pcie_txq_enable(struct iwl_trans *trans, int txq_id, u16 ssn,
 	if (cfg) {
 		fifo = cfg->fifo;
 
+		/* Disable the scheduler prior configuring the cmd queue */
+		if (txq_id == trans_pcie->cmd_queue)
+			iwl_scd_enable_set_active(trans, 0);
+
 		/* Stop this Tx queue before configuring it */
 		iwl_scd_txq_set_inactive(trans, txq_id);
 
@@ -1135,6 +1139,10 @@ void iwl_trans_pcie_txq_enable(struct iwl_trans *trans, int txq_id, u16 ssn,
 			       (cfg->fifo << SCD_QUEUE_STTS_REG_POS_TXF) |
 			       (1 << SCD_QUEUE_STTS_REG_POS_WSL) |
 			       SCD_QUEUE_STTS_REG_MSK);
+
+		/* enable the scheduler for this queue (only) */
+		if (txq_id == trans_pcie->cmd_queue)
+			iwl_scd_enable_set_active(trans, BIT(txq_id));
 	}
 
 	trans_pcie->txq[txq_id].active = true;
-- 
1.9.1


  parent reply	other threads:[~2014-09-03 19:57 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-03 19:54 pull request: iwlwifi-next 2014-09-03 Emmanuel Grumbach
2014-09-03 19:55 ` [PATCH 01/36] iwlwifi: mvm: Add set NIC temperature debug option Emmanuel Grumbach
2014-09-03 19:55 ` [PATCH 02/36] iwlwifi: mvm: reduce the AMPDU size in low latency mode Emmanuel Grumbach
2014-09-03 19:55 ` [PATCH 03/36] iwlwifi: mvm: use dynamic SMPS for P2P Client Emmanuel Grumbach
2014-09-03 19:55 ` [PATCH 04/36] iwlwifi: mvm: add use_ps-poll debugfs power option Emmanuel Grumbach
2014-09-03 19:55 ` [PATCH 05/36] iwlwifi: mvm: force protection for P2P Emmanuel Grumbach
2014-09-03 19:55 ` [PATCH 06/36] iwlwifi: mvm: reset the temperature when temperature test is disabled Emmanuel Grumbach
2014-09-03 19:55 ` [PATCH 07/36] iwlwifi: mvm: don't run automatic checks if CT was caused by debugfs Emmanuel Grumbach
2014-09-03 19:55 ` [PATCH 08/36] iwlwifi: mvm: Add marker command 0xcb Emmanuel Grumbach
2014-09-03 19:55 ` [PATCH 09/36] iwlwifi: mvm: fix the dump_umac_error_log Emmanuel Grumbach
2014-09-03 19:55 ` [PATCH 10/36] iwlwifi: make U-APSD default configurable at compile time Emmanuel Grumbach
2014-09-03 19:55 ` [PATCH 11/36] iwlwifi: mvm: add debugfs entry for ps_disabled Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 12/36] iwlwifi: mvm: disable tx aggregation on low latency vifs Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 13/36] iwlwifi: mvm: clear d0i3 state on recovery Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 14/36] iwlwifi: mvm: re-enable ps when monitor interfaces are removed Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 15/36] iwlwifi: mvm: refactor iwl_mvm_power_set_pm() to spin the ps part off Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 16/36] iwlwifi: mvm: add function to update only ps Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 17/36] iwlwifi: mvm: add option that allows a vif to disable PS Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 18/36] iwlwifi: mvm: wait for TE notif when protecting TDLS session Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 19/36] iwlwifi: consolidate hw scheduler configuration code Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 20/36] iwlwifi: trans: refactor txq_enable arguments Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 21/36] iwlwifi: mvm: enable passive fragmented scan changes Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 22/36] iwlwifi: mvm: add some debugging to quota allocation Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 23/36] iwlwifi: don't export tracepoints unnecessarily Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 24/36] iwlwifi: mvm: fix comment typo Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 25/36] iwlwifi: trans: allow skipping scheduler hardware config Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 26/36] iwlwifi: trans: make aggregation explicit for TX queue handling Emmanuel Grumbach
2014-09-03 19:56 ` Emmanuel Grumbach [this message]
2014-09-03 19:56 ` [PATCH 28/36] iwlwifi: add Intel Mobile Communications copyright Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 29/36] iwlwifi: mvm: set the TX disable bit when doing a chanctx switch Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 30/36] iwlwifi: mvm: correct firmware disassoc command sequence Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 31/36] iwlwifi: mvm: clean up FIFO definitions Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 32/36] iwlwifi: mvm: clarify stop_count, remove transport_stopped Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 33/36] iwlwifi: mvm: use tdls indication from mac80211 Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 34/36] iwlwifi: mvm: use iwl_mvm_mac_get_queues_mask() more Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 35/36] iwlwifi: mvm: clean up broadcast station handling Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 36/36] iwlwifi: mvm: clean up AUX " Emmanuel Grumbach
2014-09-04 18:05 ` pull request: iwlwifi-next 2014-09-03 John W. Linville

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=1409774184-24665-27-git-send-email-egrumbach@gmail.com \
    --to=egrumbach@gmail.com \
    --cc=avri.altman@intel.com \
    --cc=emmanuel.grumbach@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).