From: Stanislaw Gruszka Date: Wed, 7 Mar 2012 17:52:23 +0000 (-0800) Subject: iwlwifi: dump stack when fail to gain access to the device X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=aa5affbacb24cb5d8fd6f7c66e57d62164ed6d34;p=linux-beck.git iwlwifi: dump stack when fail to gain access to the device Print dump stack when the device is not responding. This should give some more clue about the reason of failure. Also change the message we print, since "MAC in deep sleep" is kinda confusing. On the way add unlikely(), as fail to gain NIC access is hmm ... unlikely. Signed-off-by: Stanislaw Gruszka 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-io.c b/drivers/net/wireless/iwlwifi/iwl-io.c index e2e3b5c9cf7f..fc365350a3e7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-io.c +++ b/drivers/net/wireless/iwlwifi/iwl-io.c @@ -121,10 +121,10 @@ int iwl_grab_nic_access_silent(struct iwl_trans *trans) int iwl_grab_nic_access(struct iwl_trans *trans) { int ret = iwl_grab_nic_access_silent(trans); - if (ret) { + if (unlikely(ret)) { u32 val = iwl_read32(trans, CSR_GP_CNTRL); - IWL_ERR(trans, - "MAC is in deep sleep!. CSR_GP_CNTRL = 0x%08X\n", val); + WARN_ONCE(1, "Timeout waiting for hardware access " + "(CSR_GP_CNTRL 0x%08x)\n", val); } return ret;