diff options
author | Shaun Ruffell <sruffell@digium.com> | 2010-04-26 23:29:17 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2010-04-26 23:29:17 +0000 |
commit | e45dca02173d7a4e80e350fd3a0166c3e49c21d9 (patch) | |
tree | 987ed2e1e2ad0df647c547da552c2385bd711cfb /drivers/dahdi/voicebus/GpakApi.c | |
parent | f38973bc196b3e6eaf1f26c7e4984f4a5379f149 (diff) |
wcte12xp, wctdm24xxp: Retry if the VPMADT032 reports not ready.
CheckDspReset can return -1 if the DSP is not ready to process any new
commands. In this case we should retry a few times to give the DSP a chance
to become ready. While I'm not ready to say this definitely fixes recently
reported cases when the wcte12xp driver constantly resets, it eliminated
communication failures to the DSP module when under stress (via the
vpm_firmware_version sysfs attribute). However, I haven't let it run long
enough to say that the issue is resolved. DAHDI-603.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8576 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/voicebus/GpakApi.c')
-rw-r--r-- | drivers/dahdi/voicebus/GpakApi.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/dahdi/voicebus/GpakApi.c b/drivers/dahdi/voicebus/GpakApi.c index 4b480ab..a44834b 100644 --- a/drivers/dahdi/voicebus/GpakApi.c +++ b/drivers/dahdi/voicebus/GpakApi.c @@ -102,7 +102,6 @@ static DSP_ADDRESS pEventFifoAddress[MAX_DSP_CORES]; /* event fifo */ static unsigned char DlByteBufr[DOWNLOAD_BLOCK_SIZE * 2]; /* Dowload byte buf */ static DSP_WORD DlWordBufr[DOWNLOAD_BLOCK_SIZE]; /* Dowload word buffer */ - /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * CheckDspReset - Check if the DSP was reset. * @@ -116,7 +115,7 @@ static DSP_WORD DlWordBufr[DOWNLOAD_BLOCK_SIZE]; /* Dowload word buffer */ * 1 = Reset occurred. * */ -static int CheckDspReset( +static int __CheckDspReset( int DspId /* DSP Identifier (0 to MaxDSPCores-1) */ ) { @@ -179,6 +178,20 @@ static int CheckDspReset( return (0); } +static int CheckDspReset( + int DspId /* DSP Identifier (0 to MaxDSPCores-1) */ + ) +{ + int ret; + int retries = 20; + while (--retries) { + ret = __CheckDspReset(DspId); + if (-1 != ret) + return ret; + msleep(5); + } + return ret; +} /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * WriteDspCmdMessage - Write a Host Command/Request message to DSP. |