From: Johannes Berg Date: Mon, 10 Oct 2011 14:26:57 +0000 (-0700) Subject: iwlagn: stop interrupts when suspending X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=d36120c6259e0d5bc435b8b690f73907357c26fb;p=~shefty%2Frdma-dev.git iwlagn: stop interrupts when suspending Occasionally, the device will send interrupts while it is resuming, at a point where we are not set up again to handle them. This causes the core IRQ handling to completely disable the IRQ, and then the driver won't work again until it is reloaded/rebound. To fix this issue disable the IRQ on suspend, this will cause us to only get interrupts again after we've setup everything on resume. Signed-off-by: Johannes Berg Signed-off-by: Wey-Yi Guy Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c index 60a8eccb713..60067c7f0de 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c @@ -1377,8 +1377,13 @@ static int iwl_trans_pcie_suspend(struct iwl_trans *trans) * But of course ... if we have configured WoWLAN then we did other * things already :-) */ - if (!trans->shrd->wowlan) + if (!trans->shrd->wowlan) { iwl_apm_stop(priv(trans)); + } else { + iwl_disable_interrupts(trans); + iwl_clear_bit(bus(trans), CSR_GP_CNTRL, + CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); + } return 0; }