diff options
author | Yoni Divinsky <yoni.divinsky@ti.com> | 2012-05-16 04:34:18 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-06-06 12:28:06 -0400 |
commit | afbe37185c0ecad3442791be666b6851eba52318 (patch) | |
tree | 67f9c5f365f2ad0831a200a5f9e8b89e8548e885 /drivers | |
parent | a1c597f2b22cdc228de3c58784b00e80b9b53e03 (diff) |
wlcore: do not send stop fwlog cmd if fw is hanged
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>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ti/wlcore/main.c | 9 | ||||
-rw-r--r-- | 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 7c4f78136bb1..54da16501e42 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c | |||
@@ -544,6 +544,7 @@ static irqreturn_t wl1271_irq(int irq, void *cookie) | |||
544 | if (unlikely(intr & WL1271_ACX_INTR_WATCHDOG)) { | 544 | if (unlikely(intr & WL1271_ACX_INTR_WATCHDOG)) { |
545 | wl1271_error("watchdog interrupt received! " | 545 | wl1271_error("watchdog interrupt received! " |
546 | "starting recovery."); | 546 | "starting recovery."); |
547 | wl->watchdog_recovery = true; | ||
547 | wl12xx_queue_recovery_work(wl); | 548 | wl12xx_queue_recovery_work(wl); |
548 | 549 | ||
549 | /* restarting the chip. ignore any other interrupt. */ | 550 | /* restarting the chip. ignore any other interrupt. */ |
@@ -782,10 +783,12 @@ static void wl12xx_read_fwlog_panic(struct wl1271 *wl) | |||
782 | 783 | ||
783 | /* | 784 | /* |
784 | * Make sure the chip is awake and the logger isn't active. | 785 | * Make sure the chip is awake and the logger isn't active. |
785 | * This might fail if the firmware hanged. | 786 | * Do not send a stop fwlog command if the fw is hanged. |
786 | */ | 787 | */ |
787 | if (!wl1271_ps_elp_wakeup(wl)) | 788 | if (!wl1271_ps_elp_wakeup(wl) && !wl->watchdog_recovery) |
788 | wl12xx_cmd_stop_fwlog(wl); | 789 | wl12xx_cmd_stop_fwlog(wl); |
790 | else | ||
791 | goto out; | ||
789 | 792 | ||
790 | /* Read the first memory block address */ | 793 | /* Read the first memory block address */ |
791 | wl12xx_fw_status(wl, wl->fw_status_1, wl->fw_status_2); | 794 | wl12xx_fw_status(wl, wl->fw_status_1, wl->fw_status_2); |
@@ -879,6 +882,7 @@ static void wl1271_recovery_work(struct work_struct *work) | |||
879 | vif = wl12xx_wlvif_to_vif(wlvif); | 882 | vif = wl12xx_wlvif_to_vif(wlvif); |
880 | __wl1271_op_remove_interface(wl, vif, false); | 883 | __wl1271_op_remove_interface(wl, vif, false); |
881 | } | 884 | } |
885 | wl->watchdog_recovery = false; | ||
882 | mutex_unlock(&wl->mutex); | 886 | mutex_unlock(&wl->mutex); |
883 | wl1271_op_stop(wl->hw); | 887 | wl1271_op_stop(wl->hw); |
884 | 888 | ||
@@ -893,6 +897,7 @@ static void wl1271_recovery_work(struct work_struct *work) | |||
893 | wlcore_wake_queues(wl, WLCORE_QUEUE_STOP_REASON_FW_RESTART); | 897 | wlcore_wake_queues(wl, WLCORE_QUEUE_STOP_REASON_FW_RESTART); |
894 | return; | 898 | return; |
895 | out_unlock: | 899 | out_unlock: |
900 | wl->watchdog_recovery = false; | ||
896 | mutex_unlock(&wl->mutex); | 901 | mutex_unlock(&wl->mutex); |
897 | } | 902 | } |
898 | 903 | ||
diff --git a/drivers/net/wireless/ti/wlcore/wlcore.h b/drivers/net/wireless/ti/wlcore/wlcore.h index 4ca968fac0eb..e63450072f4d 100644 --- a/drivers/net/wireless/ti/wlcore/wlcore.h +++ b/drivers/net/wireless/ti/wlcore/wlcore.h | |||
@@ -252,6 +252,7 @@ struct wl1271 { | |||
252 | 252 | ||
253 | /* Hardware recovery work */ | 253 | /* Hardware recovery work */ |
254 | struct work_struct recovery_work; | 254 | struct work_struct recovery_work; |
255 | bool watchdog_recovery; | ||
255 | 256 | ||
256 | /* Pointer that holds DMA-friendly block for the mailbox */ | 257 | /* Pointer that holds DMA-friendly block for the mailbox */ |
257 | struct event_mailbox *mbox; | 258 | struct event_mailbox *mbox; |