iwlwifi: print contents of control register when error occurs
authorReinette Chatre <reinette.chatre@intel.com>
Wed, 11 Mar 2009 18:18:00 +0000 (11:18 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 16 Mar 2009 22:09:47 +0000 (18:09 -0400)
hopefully the register contents will guide us to why this failure occured

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-io.h

index c7b8e5bb4e427e1d79d0ed229682c887e30780c6..083ea1ffbe87296f8533a2e5ab55d7498d5e4290 100644 (file)
@@ -156,6 +156,7 @@ static inline void __iwl_clear_bit(const char *f, u32 l,
 static inline int _iwl_grab_nic_access(struct iwl_priv *priv)
 {
        int ret;
+       u32 val;
 #ifdef CONFIG_IWLWIFI_DEBUG
        if (atomic_read(&priv->restrict_refcnt))
                return 0;
@@ -167,7 +168,8 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv)
                           (CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY |
                            CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), 15000);
        if (ret < 0) {
-               IWL_ERR(priv, "MAC is in deep sleep!\n");
+               val = _iwl_read32(priv, CSR_GP_CNTRL);
+               IWL_ERR(priv, "MAC is in deep sleep!.  CSR_GP_CNTRL = 0x%08X\n", val);
                return -EIO;
        }