]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
iwlegacy: dump stack when fail to gain access to the device
authorStanislaw Gruszka <sgruszka@redhat.com>
Mon, 13 Feb 2012 10:23:08 +0000 (11:23 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 22 Feb 2012 19:51:11 +0000 (14:51 -0500)
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: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlegacy/common.c

index 04ec38e5eaaf61308b5dee23d269908a0c5045c2..3900967a79f6a50693cf3a3a85a28c8fc2db9817 100644 (file)
@@ -111,9 +111,10 @@ _il_grab_nic_access(struct il_priv *il)
            _il_poll_bit(il, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_VAL_MAC_ACCESS_EN,
                         (CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY |
                          CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), 15000);
-       if (ret < 0) {
+       if (unlikely(ret < 0)) {
                val = _il_rd(il, CSR_GP_CNTRL);
-               IL_ERR("MAC is in deep sleep!.  CSR_GP_CNTRL = 0x%08X\n", val);
+               WARN_ONCE(1, "Timeout waiting for ucode processor access "
+                            "(CSR_GP_CNTRL 0x%08x)\n", val);
                _il_wr(il, CSR_RESET, CSR_RESET_REG_FLAG_FORCE_NMI);
                return -EIO;
        }