diff options
| author | Kanchanapally, Vidyullatha <vkanchan@qti.qualcomm.com> | 2015-04-30 16:09:08 +0530 |
|---|---|---|
| committer | AnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com> | 2015-05-06 17:30:33 +0530 |
| commit | 6ef5293a72f828313b12993ea91469535ec68cfb (patch) | |
| tree | 3ae76996632dfc590e56d79571faf2b0c871566d | |
| parent | 7d1f32367bc74ba0cff127f3b9abe0064a57e531 (diff) | |
wlan: Watchdog bite due to excessive logging
This is prima to qcacld-2.0 propagation
Sometime when sme active command is full, due to excessive
logging from pending queue, watchdog is not reset, resulting
in system crash. As a part of fix, only limited number of command
from pending queue would get printed.
Change-Id: Ibcfc4a1fd6697a857a55e6ec51038a32e8bde12d
CRs-Fixed: 684100
| -rw-r--r-- | CORE/SME/src/sme_common/sme_Api.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c index 5d1796f2b397..5c85d03974ae 100644 --- a/CORE/SME/src/sme_common/sme_Api.c +++ b/CORE/SME/src/sme_common/sme_Api.c @@ -391,6 +391,7 @@ tSmeCmd *smeGetCommandBuffer( tpAniSirGlobal pMac ) { tSmeCmd *pRetCmd = NULL, *pTempCmd = NULL; tListElem *pEntry; + static int smeCommandQueueFull = 0; pEntry = csrLLRemoveHead( &pMac->sme.smeCmdFreeList, LL_ACCESS_LOCK ); @@ -402,6 +403,8 @@ tSmeCmd *smeGetCommandBuffer( tpAniSirGlobal pMac ) if ( pEntry ) { pRetCmd = GET_BASE_ADDR( pEntry, tSmeCmd, Link ); + /* reset when free list is available */ + smeCommandQueueFull = 0; } else { int idx = 1; @@ -426,11 +429,14 @@ tSmeCmd *smeGetCommandBuffer( tpAniSirGlobal pMac ) //dump what is in the pending queue csrLLLock(&pMac->sme.smeCmdPendingList); pEntry = csrLLPeekHead( &pMac->sme.smeCmdPendingList, LL_ACCESS_NOLOCK ); - while(pEntry) + while(pEntry && !smeCommandQueueFull) { pTempCmd = GET_BASE_ADDR( pEntry, tSmeCmd, Link ); - smsLog( pMac, LOGE, "Out of command buffer.... SME pending command #%d (0x%X)", - idx++, pTempCmd->command ); + /* Print only 1st five commands from pending queue. */ + if (idx <= 5) + smsLog( pMac, LOGE, "Out of command buffer.... SME pending command #%d (0x%X)", + idx, pTempCmd->command ); + idx++; if( eSmeCsrCommandMask & pTempCmd->command ) { //CSR command is stuck. See what the reason code is for that command @@ -438,6 +444,8 @@ tSmeCmd *smeGetCommandBuffer( tpAniSirGlobal pMac ) } pEntry = csrLLNext( &pMac->sme.smeCmdPendingList, pEntry, LL_ACCESS_NOLOCK ); } + /* Increament static variable so that it prints pending command only once*/ + smeCommandQueueFull++; csrLLUnlock(&pMac->sme.smeCmdPendingList); //There may be some more command in CSR's own pending queue |
