From: Yoni Divinsky <yoni.divinsky@ti.com>
To: <linux-wireless@vger.kernel.org>
Cc: <arik@wizery.com>, <coelho@ti.com>
Subject: [PATCH v2] wlcore: do not send stop fwlog cmd if fw is hanged
Date: Wed, 16 May 2012 11:34:18 +0300 [thread overview]
Message-ID: <1337157258-15163-2-git-send-email-yoni.divinsky@ti.com> (raw)
In-Reply-To: <1337157258-15163-1-git-send-email-yoni.divinsky@ti.com>
If the driver received a watchdog interrupt then the
assumption is that the fw is hanged. Avoid sending
the stop fwlog command in case of a watchdog recovey
to avoid waiting for the 2 seconds timeout of the command.
Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
---
drivers/net/wireless/ti/wlcore/main.c | 9 +++++++--
drivers/net/wireless/ti/wlcore/wlcore.h | 1 +
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 45fe911..305a7c1 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -582,6 +582,7 @@ static irqreturn_t wl1271_irq(int irq, void *cookie)
if (unlikely(intr & WL1271_ACX_INTR_WATCHDOG)) {
wl1271_error("watchdog interrupt received! "
"starting recovery.");
+ wl->watchdog_recovery = true;
wl12xx_queue_recovery_work(wl);
/* restarting the chip. ignore any other interrupt. */
@@ -820,10 +821,12 @@ static void wl12xx_read_fwlog_panic(struct wl1271 *wl)
/*
* Make sure the chip is awake and the logger isn't active.
- * This might fail if the firmware hanged.
+ * Do not send a stop fwlog command if the fw is hanged.
*/
- if (!wl1271_ps_elp_wakeup(wl))
+ if (!wl1271_ps_elp_wakeup(wl) && !wl->watchdog_recovery)
wl12xx_cmd_stop_fwlog(wl);
+ else
+ goto out;
/* Read the first memory block address */
wl12xx_fw_status(wl, wl->fw_status);
@@ -914,6 +917,7 @@ static void wl1271_recovery_work(struct work_struct *work)
vif = wl12xx_wlvif_to_vif(wlvif);
__wl1271_op_remove_interface(wl, vif, false);
}
+ wl->watchdog_recovery = false;
mutex_unlock(&wl->mutex);
wl1271_op_stop(wl->hw);
@@ -928,6 +932,7 @@ static void wl1271_recovery_work(struct work_struct *work)
ieee80211_wake_queues(wl->hw);
return;
out_unlock:
+ wl->watchdog_recovery = false;
mutex_unlock(&wl->mutex);
}
diff --git a/drivers/net/wireless/ti/wlcore/wlcore.h b/drivers/net/wireless/ti/wlcore/wlcore.h
index 0b3f0b5..d6a8ad4 100644
--- a/drivers/net/wireless/ti/wlcore/wlcore.h
+++ b/drivers/net/wireless/ti/wlcore/wlcore.h
@@ -228,6 +228,7 @@ struct wl1271 {
/* Hardware recovery work */
struct work_struct recovery_work;
+ bool watchdog_recovery;
/* Pointer that holds DMA-friendly block for the mailbox */
struct event_mailbox *mbox;
--
1.7.0.4
next prev parent reply other threads:[~2012-05-16 8:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-16 8:34 [PATCH] wlcore: add role_id to all the sched_scan commands Yoni Divinsky
2012-05-16 8:34 ` Yoni Divinsky [this message]
2012-06-06 17:07 ` [PATCH v2] wlcore: do not send stop fwlog cmd if fw is hanged Luciano Coelho
2012-06-06 17:06 ` [PATCH] wlcore: add role_id to all the sched_scan commands Luciano Coelho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1337157258-15163-2-git-send-email-yoni.divinsky@ti.com \
--to=yoni.divinsky@ti.com \
--cc=arik@wizery.com \
--cc=coelho@ti.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).