diff options
| author | gaolez <gaolez@codeaurora.org> | 2017-03-01 20:03:36 +0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-03-27 23:40:22 -0700 |
| commit | 1a38846db372c19ae3d66d06fefbce8789f80e01 (patch) | |
| tree | 5be6875ff24747644228586553330487135cfa36 | |
| parent | 056b4e6debcae13538586ad58aac344655554cbf (diff) | |
qcacld-2.0: Dump firmware memory when WoW timeout
In the case of enable WoW, if no credit to send wmi down, wmi
will pending in htc queue, this will casue waiting WoW enable
ack timeout, so need host force dump target memory to check
the issue.
Change-Id: I8a9436bbd89cafa59df51a41ae417b28f487e00d
CRs-Fixed: 2014350
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 2 | ||||
| -rw-r--r-- | CORE/VOSS/inc/vos_api.h | 3 | ||||
| -rw-r--r-- | CORE/VOSS/src/vos_api.c | 25 |
3 files changed, 29 insertions, 1 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index 9087e6705c3f..aaa20d729ded 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -24265,9 +24265,11 @@ int wma_enable_wow_in_fw(WMA_HANDLE handle, int runtime_pm) if (pMac->sme.enableSelfRecovery) { vos_trigger_recovery(false); } else { + vos_force_fw_dump(); VOS_BUG(0); } #else + vos_force_fw_dump(); VOS_BUG(0); #endif } else { diff --git a/CORE/VOSS/inc/vos_api.h b/CORE/VOSS/inc/vos_api.h index 7a039cca636a..26812710b2bf 100644 --- a/CORE/VOSS/inc/vos_api.h +++ b/CORE/VOSS/inc/vos_api.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -384,4 +384,5 @@ int vos_get_radio_index(void); int vos_set_radio_index(int radio_index); void vos_svc_fw_shutdown_ind(struct device *dev); uint64_t vos_do_div(uint64_t, uint32_t); +VOS_STATUS vos_force_fw_dump(void); #endif // if !defined __VOS_API_H diff --git a/CORE/VOSS/src/vos_api.c b/CORE/VOSS/src/vos_api.c index 93454b4f95a8..96a5dcb9c023 100644 --- a/CORE/VOSS/src/vos_api.c +++ b/CORE/VOSS/src/vos_api.c @@ -3115,3 +3115,28 @@ uint64_t vos_do_div(uint64_t dividend, uint32_t divisor) /*do_div macro updates dividend with Quotient of dividend/divisor */ return dividend; } + +/** + * vos_force_fw_dump() - force target to dump + * + *return + * VOS_STATUS_SUCCESS - Operation completed successfully. + * VOS_STATUS_E_FAILURE - Operation failed. + */ +VOS_STATUS vos_force_fw_dump(void) +{ + struct ol_softc *scn; + + scn = vos_get_context(VOS_MODULE_ID_HIF, gpVosContext); + if (!scn) { + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, + "%s: scn is null!", __func__); + return VOS_STATUS_E_FAILURE; + } + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + "%s:enter!", __func__); + + ol_target_failure(scn, A_ERROR); + + return VOS_STATUS_SUCCESS; +} |
