diff options
-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); } /*! |