aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/pcie/trans.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-11-14 10:29:47 -0500
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-11-23 13:07:37 -0500
commit522713c81e4ec98c554d74bcf8c26ddbfa6a30ee (patch)
treea92c5e2173ceeacd846d56207d35853e75b9663c /drivers/net/wireless/iwlwifi/pcie/trans.c
parenteffd05ac479b80641835f9126bbe93146686c2b8 (diff)
iwlwifi: pcie: properly reset the device
We were toggling the wrong bit when we reset the device, fix that. Moreover, since the reset can take time, we need to wait before we set the rfkill interrupt. Not doing so can be racy since the driver is enabling the rfkill interrupt while the device is resetting which will clear all the registers including the CSR_INT_MASK. This can basically lead to a situation where we don't enable the rfkill interrupt. If that happens, the user will not be able to re-enable the device when de-asserting rfkill. This scenario happened to the submitter of: https://bugzilla.kernel.org/show_bug.cgi?id=87191 Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/pcie/trans.c')
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/trans.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c
index ee2ec516e30c..b81d1412c352 100644
--- a/drivers/net/wireless/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
@@ -942,7 +942,8 @@ static void iwl_trans_pcie_stop_device(struct iwl_trans *trans)
942 spin_unlock(&trans_pcie->irq_lock); 942 spin_unlock(&trans_pcie->irq_lock);
943 943
944 /* stop and reset the on-board processor */ 944 /* stop and reset the on-board processor */
945 iwl_write32(trans, CSR_RESET, CSR_RESET_REG_FLAG_NEVO_RESET); 945 iwl_write32(trans, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET);
946 udelay(20);
946 947
947 /* clear all status bits */ 948 /* clear all status bits */
948 clear_bit(STATUS_SYNC_HCMD_ACTIVE, &trans->status); 949 clear_bit(STATUS_SYNC_HCMD_ACTIVE, &trans->status);