diff options
author | Shaun Ruffell <sruffell@digium.com> | 2010-05-14 16:02:21 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2010-05-14 16:02:21 +0000 |
commit | 1390de3f80c2601ab232ff02d4a1d35927c7e607 (patch) | |
tree | fa4ed1f8dbfff0ebb08c39148ac11c9d90de6d4e | |
parent | d5fad9ab6b88b10a33eced56dd604fce165ac466 (diff) |
Merged revisions 8560,8575-8576 via svnmerge from
https://origsvn.digium.com/svn/dahdi/linux/trunk
........
r8560 | sruffell | 2010-04-22 16:36:16 -0500 (Thu, 22 Apr 2010) | 11 lines
wcte12xp, wctdm24xxp: Ensure writes to I/O registers are flushed.
In revision 8176 I changed register access from I/O space to memory mapped
registers. Unfortunately, when I made that change, I didn't account for
posted writes. This change makes sure all the registers are read back to
ensure that they are posted through any intermediate bridges.
The most readily observable symptom were cards that were taking 2000
interrupts/second. The card reported that it handled an interrupt but the
write to silence the card wasn't flushed through until the second time the
interrupt handler run. DAHDI-602.
........
r8575 | sruffell | 2010-04-26 18:29:16 -0500 (Mon, 26 Apr 2010) | 4 lines
wcte12xp, wctdm24xxp: Do not allow interruptible sleep on VPM lock.
If the sleep is ever interrupted, 'up' will still be called in the GpakApi,
essentially making the lock useless after that point.
........
r8576 | sruffell | 2010-04-26 18:29:17 -0500 (Mon, 26 Apr 2010) | 9 lines
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/branches/2.3@8621 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r-- | drivers/dahdi/voicebus/GpakApi.c | 17 | ||||
-rw-r--r-- | drivers/dahdi/voicebus/GpakCust.c | 11 | ||||
-rw-r--r-- | drivers/dahdi/voicebus/GpakCust.h | 1 | ||||
-rw-r--r-- | drivers/dahdi/voicebus/voicebus.c | 1 |
4 files changed, 22 insertions, 8 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. diff --git a/drivers/dahdi/voicebus/GpakCust.c b/drivers/dahdi/voicebus/GpakCust.c index 74c3304..11453fc 100644 --- a/drivers/dahdi/voicebus/GpakCust.c +++ b/drivers/dahdi/voicebus/GpakCust.c @@ -32,7 +32,6 @@ #include <linux/version.h> #include <linux/types.h> -#include <linux/delay.h> #include <linux/pci.h> #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) #include <linux/semaphore.h> @@ -900,11 +899,11 @@ void gpakLockAccess(unsigned short DspId) vpm = find_iface(DspId); - if (vpm) { - if (down_interruptible(&vpm->sem)) { - return; - } - } + if (!vpm) + return; + + down(&vpm->sem); + return; } diff --git a/drivers/dahdi/voicebus/GpakCust.h b/drivers/dahdi/voicebus/GpakCust.h index 915a642..2b28480 100644 --- a/drivers/dahdi/voicebus/GpakCust.h +++ b/drivers/dahdi/voicebus/GpakCust.h @@ -39,6 +39,7 @@ #include <linux/device.h> #include <linux/completion.h> #include <linux/workqueue.h> +#include <linux/delay.h> #include "gpakenum.h" #include "adt_lec.h" diff --git a/drivers/dahdi/voicebus/voicebus.c b/drivers/dahdi/voicebus/voicebus.c index 51b5c34..8e50332 100644 --- a/drivers/dahdi/voicebus/voicebus.c +++ b/drivers/dahdi/voicebus/voicebus.c @@ -433,6 +433,7 @@ __vb_setctl(struct voicebus *vb, u32 addr, u32 val) { wmb(); writel(val, vb->iobase + addr); + readl(vb->iobase + addr); } /*! |