Skip to content

Commit

Permalink
iwlwifi: stop interrupts before stopping device
Browse files Browse the repository at this point in the history
If an RX interrupt is signalled after or during apm_stop
we may try to access the peripherals which are already
down. Prevent this by disabling interrupts first.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
David Spinadel authored and Johannes Berg committed Sep 10, 2012
1 parent 8b61fa2 commit ee7d737
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/wireless/iwlwifi/pcie/trans.c
Original file line number Diff line number Diff line change
Expand Up @@ -1453,6 +1453,10 @@ static void iwl_trans_pcie_stop_hw(struct iwl_trans *trans,
bool hw_rfkill;
unsigned long flags;

spin_lock_irqsave(&trans_pcie->irq_lock, flags);
iwl_disable_interrupts(trans);
spin_unlock_irqrestore(&trans_pcie->irq_lock, flags);

iwl_apm_stop(trans);

spin_lock_irqsave(&trans_pcie->irq_lock, flags);
Expand Down

0 comments on commit ee7d737

Please sign in to comment.