aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/pcie/trans.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2013-12-11 03:22:28 -0500
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2013-12-21 14:23:03 -0500
commit7b70bd63c61d17a05a03bfc2f4eb83c1200a2509 (patch)
tree309e8b738b833edc0ce9ac7616848337a4ca219b /drivers/net/wireless/iwlwifi/pcie/trans.c
parent7ba1faa45f5d1ea2ddd36c6d5f59a81fea611d92 (diff)
iwlwifi: pcie: use don't disable interrupt when irq_lock is taken
Since we don't take this lock in the primary interrupt handler, there is no pointin disabling the interrupt in the critical section protected by trans_pcie->irq_lock. Reviewed-by: Johannes Berg <johannes.berg@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.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c
index 721050735ee6..9a07cf3062ea 100644
--- a/drivers/net/wireless/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
@@ -271,13 +271,12 @@ static void iwl_pcie_apm_stop(struct iwl_trans *trans)
271static int iwl_pcie_nic_init(struct iwl_trans *trans) 271static int iwl_pcie_nic_init(struct iwl_trans *trans)
272{ 272{
273 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); 273 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
274 unsigned long flags;
275 274
276 /* nic_init */ 275 /* nic_init */
277 spin_lock_irqsave(&trans_pcie->irq_lock, flags); 276 spin_lock(&trans_pcie->irq_lock);
278 iwl_pcie_apm_init(trans); 277 iwl_pcie_apm_init(trans);
279 278
280 spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); 279 spin_unlock(&trans_pcie->irq_lock);
281 280
282 iwl_pcie_set_pwr(trans, false); 281 iwl_pcie_set_pwr(trans, false);
283 282
@@ -635,13 +634,12 @@ static void iwl_trans_pcie_fw_alive(struct iwl_trans *trans, u32 scd_addr)
635static void iwl_trans_pcie_stop_device(struct iwl_trans *trans) 634static void iwl_trans_pcie_stop_device(struct iwl_trans *trans)
636{ 635{
637 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); 636 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
638 unsigned long flags;
639 bool hw_rfkill; 637 bool hw_rfkill;
640 638
641 /* tell the device to stop sending interrupts */ 639 /* tell the device to stop sending interrupts */
642 spin_lock_irqsave(&trans_pcie->irq_lock, flags); 640 spin_lock(&trans_pcie->irq_lock);
643 iwl_disable_interrupts(trans); 641 iwl_disable_interrupts(trans);
644 spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); 642 spin_unlock(&trans_pcie->irq_lock);
645 643
646 /* device going down, Stop using ICT table */ 644 /* device going down, Stop using ICT table */
647 iwl_pcie_disable_ict(trans); 645 iwl_pcie_disable_ict(trans);
@@ -673,9 +671,9 @@ static void iwl_trans_pcie_stop_device(struct iwl_trans *trans)
673 /* Upon stop, the APM issues an interrupt if HW RF kill is set. 671 /* Upon stop, the APM issues an interrupt if HW RF kill is set.
674 * Clean again the interrupt here 672 * Clean again the interrupt here
675 */ 673 */
676 spin_lock_irqsave(&trans_pcie->irq_lock, flags); 674 spin_lock(&trans_pcie->irq_lock);
677 iwl_disable_interrupts(trans); 675 iwl_disable_interrupts(trans);
678 spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); 676 spin_unlock(&trans_pcie->irq_lock);
679 677
680 /* stop and reset the on-board processor */ 678 /* stop and reset the on-board processor */
681 iwl_write32(trans, CSR_RESET, CSR_RESET_REG_FLAG_NEVO_RESET); 679 iwl_write32(trans, CSR_RESET, CSR_RESET_REG_FLAG_NEVO_RESET);
@@ -821,18 +819,17 @@ static int iwl_trans_pcie_start_hw(struct iwl_trans *trans)
821static void iwl_trans_pcie_op_mode_leave(struct iwl_trans *trans) 819static void iwl_trans_pcie_op_mode_leave(struct iwl_trans *trans)
822{ 820{
823 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); 821 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
824 unsigned long flags;
825 822
826 /* disable interrupts - don't enable HW RF kill interrupt */ 823 /* disable interrupts - don't enable HW RF kill interrupt */
827 spin_lock_irqsave(&trans_pcie->irq_lock, flags); 824 spin_lock(&trans_pcie->irq_lock);
828 iwl_disable_interrupts(trans); 825 iwl_disable_interrupts(trans);
829 spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); 826 spin_unlock(&trans_pcie->irq_lock);
830 827
831 iwl_pcie_apm_stop(trans); 828 iwl_pcie_apm_stop(trans);
832 829
833 spin_lock_irqsave(&trans_pcie->irq_lock, flags); 830 spin_lock(&trans_pcie->irq_lock);
834 iwl_disable_interrupts(trans); 831 iwl_disable_interrupts(trans);
835 spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); 832 spin_unlock(&trans_pcie->irq_lock);
836 833
837 iwl_pcie_disable_ict(trans); 834 iwl_pcie_disable_ict(trans);
838} 835}