All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 1/4] iwlwifi: dump stack when fail to gain access to the device
@ 2012-02-06 16:09 Stanislaw Gruszka
  2012-02-06 16:08 ` wwguy
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Stanislaw Gruszka @ 2012-02-06 16:09 UTC (permalink / raw)
  To: Wey-Yi Guy; +Cc: Intel Linux Wireless, linux-wireless, Stanislaw Gruszka

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>
---
 drivers/net/wireless/iwlwifi/iwl-io.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-io.c b/drivers/net/wireless/iwlwifi/iwl-io.c
index 83fdff3..ce6d9c1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-io.c
+++ b/drivers/net/wireless/iwlwifi/iwl-io.c
@@ -120,10 +120,10 @@ int iwl_grab_nic_access_silent(struct iwl_bus *bus)
 int iwl_grab_nic_access(struct iwl_bus *bus)
 {
 	int ret = iwl_grab_nic_access_silent(bus);
-	if (ret) {
+	if (unlikely(ret)) {
 		u32 val = iwl_read32(bus, CSR_GP_CNTRL);
-		IWL_ERR(bus,
-			"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);
 	}
 
 	return ret;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2012-02-23 10:14 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-06 16:09 [RFC 1/4] iwlwifi: dump stack when fail to gain access to the device Stanislaw Gruszka
2012-02-06 16:08 ` wwguy
2012-02-07  8:01   ` Stanislaw Gruszka
2012-02-07 14:21     ` Guy, Wey-Yi
2012-02-08 10:52       ` Stanislaw Gruszka
2012-02-06 16:09 ` [RFC 2/4] iwlwifi: always check if got h/w access before write Stanislaw Gruszka
2012-02-06 16:13   ` wwguy
2012-02-07  8:05     ` Stanislaw Gruszka
2012-02-07 14:20       ` Guy, Wey-Yi
2012-02-06 16:09 ` [RFC 3/4] iwlwifi: cleanup/fix memory barriers Stanislaw Gruszka
2012-02-06 16:13   ` Johannes Berg
2012-02-07  8:11     ` Stanislaw Gruszka
2012-02-07  8:25       ` Johannes Berg
2012-02-06 16:09 ` [RFC 4/4] iwlwifi: use writeb,writel,readl directly Stanislaw Gruszka
2012-02-06 16:32   ` wwguy
2012-02-07  8:22     ` Stanislaw Gruszka
2012-02-07 14:22       ` Guy, Wey-Yi
2012-02-10 12:01 ` [RFC 1/4] iwlwifi: dump stack when fail to gain access to the device Stanislaw Gruszka
2012-02-23 10:14   ` Stanislaw Gruszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.