From: Luca Coelho <luca@coelho.fi>
To: kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org,
Johannes Berg <johannes.berg@intel.com>,
Luca Coelho <luciano.coelho@intel.com>
Subject: [PATCH 21/21] iwlwifi: implement BISR HW workaround for 22260 devices
Date: Thu, 31 Jan 2019 22:22:06 +0200 [thread overview]
Message-ID: <20190131202206.15903-22-luca@coelho.fi> (raw)
In-Reply-To: <20190131202206.15903-1-luca@coelho.fi>
From: Johannes Berg <johannes.berg@intel.com>
There's a small hardware bug in 22260 devices which thus require a
few more delays during initialization. Implement this workaround.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/cfg/22000.c | 3 +++
drivers/net/wireless/intel/iwlwifi/iwl-config.h | 4 +++-
drivers/net/wireless/intel/iwlwifi/iwl-io.c | 10 ++++++++++
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/22000.c b/drivers/net/wireless/intel/iwlwifi/cfg/22000.c
index c547288d32aa..28d8c3477371 100644
--- a/drivers/net/wireless/intel/iwlwifi/cfg/22000.c
+++ b/drivers/net/wireless/intel/iwlwifi/cfg/22000.c
@@ -220,6 +220,7 @@ const struct iwl_cfg iwl22260_2ax_cfg = {
* HT size; mac80211 would otherwise pick the HE max (256) by default.
*/
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
+ .bisr_workaround = 1,
};
const struct iwl_cfg killer1650x_2ax_cfg = {
@@ -232,6 +233,7 @@ const struct iwl_cfg killer1650x_2ax_cfg = {
* HT size; mac80211 would otherwise pick the HE max (256) by default.
*/
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
+ .bisr_workaround = 1,
};
const struct iwl_cfg killer1650w_2ax_cfg = {
@@ -244,6 +246,7 @@ const struct iwl_cfg killer1650w_2ax_cfg = {
* HT size; mac80211 would otherwise pick the HE max (256) by default.
*/
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
+ .bisr_workaround = 1,
};
/*
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h
index f1e493380713..5e713730165a 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h
@@ -379,6 +379,7 @@ struct iwl_csr_params {
* @nvm_type: see &enum iwl_nvm_type
* @d3_debug_data_base_addr: base address where D3 debug data is stored
* @d3_debug_data_length: length of the D3 debug data
+ * @bisr_workaround: BISR hardware workaround (for 22260 series devices)
*
* We enable the driver to be backward compatible wrt. hardware features.
* API differences in uCode shouldn't be handled here but through TLVs
@@ -428,7 +429,8 @@ struct iwl_cfg {
use_tfh:1,
gen2:1,
cdb:1,
- dbgc_supported:1;
+ dbgc_supported:1,
+ bisr_workaround:1;
u8 valid_tx_ant;
u8 valid_rx_ant;
u8 non_shared_ant;
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-io.c b/drivers/net/wireless/intel/iwlwifi/iwl-io.c
index 4ea5883f9175..bf171edad53a 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-io.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-io.c
@@ -493,6 +493,11 @@ int iwl_finish_nic_init(struct iwl_trans *trans)
{
int err;
+ if (trans->cfg->bisr_workaround) {
+ /* ensure the TOP FSM isn't still in previous reset */
+ mdelay(2);
+ }
+
/*
* Set "initialization complete" bit to move adapter from
* D0U* --> D0A* (powered-up active) state.
@@ -515,6 +520,11 @@ int iwl_finish_nic_init(struct iwl_trans *trans)
if (err < 0)
IWL_DEBUG_INFO(trans, "Failed to wake NIC\n");
+ if (trans->cfg->bisr_workaround) {
+ /* ensure BISR shift has finished */
+ udelay(200);
+ }
+
return err < 0 ? err : 0;
}
IWL_EXPORT_SYMBOL(iwl_finish_nic_init);
--
2.20.1
prev parent reply other threads:[~2019-01-31 20:23 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-31 20:21 [PATCH 00/21] iwlwifi: updates intended for v5.1 2019-01-31 Luca Coelho
2019-01-31 20:21 ` [PATCH 01/21] iwlwifi: mvm: limit AMSDU size to 8K Luca Coelho
2019-01-31 20:21 ` [PATCH 02/21] iwlwifi: mvm: remove redundant condition Luca Coelho
2019-01-31 20:21 ` [PATCH 03/21] iwlwifi: mvm: add tlc command name to output Luca Coelho
2019-01-31 20:21 ` [PATCH 04/21] iwlwifi: mvm: config mac ctxt to HE before TLC Luca Coelho
2019-01-31 20:21 ` [PATCH 05/21] iwlwifi: dvm: use %u for sscanf() into unsigned variable Luca Coelho
2019-01-31 20:21 ` [PATCH 06/21] iwlwifi: dbg_ini: remove redundant dram buffer allocation Luca Coelho
2019-01-31 20:21 ` [PATCH 07/21] iwlwifi: mvm: add HE TB PPDU SIG-A BW to radiotap Luca Coelho
2019-02-06 18:11 ` Kalle Valo
2019-02-06 19:05 ` Johannes Berg
2019-02-07 9:33 ` Kalle Valo
2019-01-31 20:21 ` [PATCH 08/21] iwlwifi: move config structs to C file Luca Coelho
2019-01-31 20:21 ` [PATCH 09/21] iwlwifi: mvm: add description to second BAD_COMMAND assert number Luca Coelho
2019-01-31 20:21 ` [PATCH 10/21] iwlwifi: mvm: don't hide HE radiotap data in SKB Luca Coelho
2019-01-31 20:21 ` [PATCH 11/21] iwlwifi: mvm: support absolute thresholds in bf configuration Luca Coelho
2019-01-31 20:21 ` [PATCH 12/21] iwlwifi: mvm: fix RSS config command Luca Coelho
2019-01-31 20:21 ` [PATCH 13/21] iwlwifi: dbg_ini: align struct iwl_fw_ini_region_cfg to the FW Luca Coelho
2019-01-31 20:21 ` [PATCH 14/21] iwlwifi: dbg_ini: create new dump flow and implement prph dump Luca Coelho
2019-01-31 20:22 ` [PATCH 15/21] iwlwifi: dbg_ini: implement csr memory dump Luca Coelho
2019-01-31 20:22 ` [PATCH 16/21] iwlwifi: dbg_ini: implement device internal " Luca Coelho
2019-01-31 20:22 ` [PATCH 17/21] iwlwifi: dbg_ini: implement paging " Luca Coelho
2019-01-31 20:22 ` [PATCH 18/21] iwlwifi: fix send hcmd timeout recovery flow Luca Coelho
2019-01-31 20:22 ` [PATCH 19/21] iwlwifi: refactor NIC init sequence Luca Coelho
2019-01-31 20:22 ` [PATCH 20/21] iwlwifi: mvm: fix RFH config command with >=10 CPUs Luca Coelho
2019-01-31 20:22 ` Luca Coelho [this message]
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=20190131202206.15903-22-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;
as well as URLs for NNTP newsgroup(s).