Skip to content

Commit

Permalink
iwlwifi: dump stack when fail to gain access to the device
Browse files Browse the repository at this point in the history
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 <sgruszka@redhat.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Stanislaw Gruszka authored and John W. Linville committed Mar 8, 2012
1 parent 9441b85 commit aa5affb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/wireless/iwlwifi/iwl-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit aa5affb

Please sign in to comment.