From 910da118e4f81ca9509bc0a473cf0727d9726978 Mon Sep 17 00:00:00 2001 From: DARAM SUDHA Date: Tue, 26 May 2015 19:26:16 +0530 Subject: [PATCH] qcacld-3.0: Add debug code to rootcause command timeout issue. qcacld-2.0 to qcacld-3.0 propagation when EXIT_BMPS is pending in activeList, it causes crash with excess logging for RoamPending list. In this scenario gTraceTbl has lost SME details due to other MTRACE commands. Because of which, the issue is not rootcaused. Add below changes to rootcause if the issue appears again: 1. print only first 5 commands from roamPendingList 2. Bug_on if the commandlist is full 3. Add MTRACE for PMC commands CRs-Fixed: 833261 Change-Id: Id5bb399c4a8c8e84ddfa121a66881e3ecb901b05 --- core/sme/src/common/sme_api.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index a2b0eec48634..f4cc8df95029 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -546,29 +546,37 @@ tSmeCmd *sme_get_command_buffer(tpAniSirGlobal pMac) csr_ll_next(&pMac->sme.smeCmdPendingList, pEntry, LL_ACCESS_NOLOCK); } - /* Increment static variable so that it prints - * pending command only once - */ - sme_command_queue_full++; - csr_ll_unlock(&pMac->sme.smeCmdPendingList); + idx = 1; /* There may be some more command in CSR's own pending queue */ csr_ll_lock(&pMac->roam.roamCmdPendingList); pEntry = csr_ll_peek_head(&pMac->roam.roamCmdPendingList, LL_ACCESS_NOLOCK); - while (pEntry) { + while (pEntry && !sme_command_queue_full) { pTempCmd = GET_BASE_ADDR(pEntry, tSmeCmd, Link); - sms_log(pMac, LOGE, - "Out of command buffer.... CSR pending command #%d (0x%X)", - idx++, pTempCmd->command); + /* Print only 1st five commands from CSR pending queue */ + if (idx <= 5) + sms_log(pMac, LOGE, + "Out of command buffer.... " + "CSR roamCmdPendingList command #%d (0x%X)", + idx, pTempCmd->command); + idx++; dump_csr_command_info(pMac, pTempCmd); pEntry = csr_ll_next(&pMac->roam.roamCmdPendingList, pEntry, LL_ACCESS_NOLOCK); } + + /* Increment static variable so that it prints + * pending command only once + */ + sme_command_queue_full++; csr_ll_unlock(&pMac->roam.roamCmdPendingList); + + /* panic with out-of-command */ + CDF_BUG(0); } /* memset to zero */