From b998fbbd531fe33d9dd50fd37056f48b4257113d Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Mon, 10 Dec 2018 09:36:58 +0100 Subject: iwlwifi: implement BISR HW workaround for 22260 devices 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 Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/iwl-io.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/net/wireless/intel/iwlwifi/iwl-io.c') 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); -- cgit v1.2.3