diff options
author | Reinette Chatre <reinette.chatre@intel.com> | 2009-03-11 14:18:00 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-03-16 18:09:47 -0400 |
commit | 18d426c4a8991d1d6c0dc33a62b610b8a6ffc1d2 (patch) | |
tree | d8d9c4d1a74e43001961f77991057cfca702acac | |
parent | 48676eb3c3de9013de7d9a63fb8ffb70cd540d95 (diff) |
iwlwifi: print contents of control register when error occurs
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>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-io.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-io.h b/drivers/net/wireless/iwlwifi/iwl-io.h index c7b8e5bb4e42..083ea1ffbe87 100644 --- a/drivers/net/wireless/iwlwifi/iwl-io.h +++ b/drivers/net/wireless/iwlwifi/iwl-io.h | |||
@@ -156,6 +156,7 @@ static inline void __iwl_clear_bit(const char *f, u32 l, | |||
156 | static inline int _iwl_grab_nic_access(struct iwl_priv *priv) | 156 | static inline int _iwl_grab_nic_access(struct iwl_priv *priv) |
157 | { | 157 | { |
158 | int ret; | 158 | int ret; |
159 | u32 val; | ||
159 | #ifdef CONFIG_IWLWIFI_DEBUG | 160 | #ifdef CONFIG_IWLWIFI_DEBUG |
160 | if (atomic_read(&priv->restrict_refcnt)) | 161 | if (atomic_read(&priv->restrict_refcnt)) |
161 | return 0; | 162 | return 0; |
@@ -167,7 +168,8 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv) | |||
167 | (CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY | | 168 | (CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY | |
168 | CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), 15000); | 169 | CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), 15000); |
169 | if (ret < 0) { | 170 | if (ret < 0) { |
170 | IWL_ERR(priv, "MAC is in deep sleep!\n"); | 171 | val = _iwl_read32(priv, CSR_GP_CNTRL); |
172 | IWL_ERR(priv, "MAC is in deep sleep!. CSR_GP_CNTRL = 0x%08X\n", val); | ||
171 | return -EIO; | 173 | return -EIO; |
172 | } | 174 | } |
173 | 175 | ||