diff options
| author | Rajeev Kumar <rajekuma@qca.qualcomm.com> | 2014-11-20 16:54:05 -0800 |
|---|---|---|
| committer | Akash Patel <c_akashp@qca.qualcomm.com> | 2014-11-21 11:37:55 -0800 |
| commit | 6d40ee06511e8a3fb024c81cbf184ed775707dec (patch) | |
| tree | 7b18197f938b34242ee68b9e7e3b1a5e35e98dfd | |
| parent | 14050047b3f1a5c8798aba6c9504c4290b09342d (diff) | |
qcacld-new: Debug change to catch MC thread stuck issue
Add debug change to call panic after detecting MC thread
is stuck.
Change-Id: Iea7c53138ed783eda7f90c732f667dab505a7ee0
CRs-fixed: 760528
| -rw-r--r-- | CORE/VOSS/src/vos_api.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/CORE/VOSS/src/vos_api.c b/CORE/VOSS/src/vos_api.c index 224e2db0700c..03a80faec410 100644 --- a/CORE/VOSS/src/vos_api.c +++ b/CORE/VOSS/src/vos_api.c @@ -99,6 +99,9 @@ /* Approximate amount of time to wait for WDA to issue a DUMP req */ #define VOS_WDA_RESP_TIMEOUT WDA_STOP_TIMEOUT +/* Maximum number of vos message queue get wrapper failures to cause panic */ +#define VOS_WRAPPER_MAX_FAIL_COUNT (1000) + /*--------------------------------------------------------------------------- * Data definitions * ------------------------------------------------------------------------*/ @@ -1591,6 +1594,7 @@ VOS_STATUS vos_mq_post_message( VOS_MQ_ID msgQueueId, vos_msg_t *pMsg ) { pVosMqType pTargetMq = NULL; pVosMsgWrapper pMsgWrapper = NULL; + static uint32_t debug_count = 0; if ((gpVosContext == NULL) || (pMsg == NULL)) { @@ -1659,14 +1663,21 @@ VOS_STATUS vos_mq_post_message( VOS_MQ_ID msgQueueId, vos_msg_t *pMsg ) */ pMsgWrapper = vos_mq_get(&gpVosContext->freeVosMq); - if (NULL == pMsgWrapper) - { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, - "%s: VOS Core run out of message wrapper", __func__); + if (NULL == pMsgWrapper) { + debug_count++; + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + "%s: VOS Core run out of message wrapper %d", + __func__, debug_count); + + if (VOS_WRAPPER_MAX_FAIL_COUNT == debug_count) { + VOS_BUG(0); + } return VOS_STATUS_E_RESOURCES; } + debug_count = 0; + /* ** Copy the message now */ |
