[svn-commits] sruffell: linux/trunk r8576 - /linux/trunk/drivers/dahdi/voicebus/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Apr 26 18:29:27 CDT 2010


Author: sruffell
Date: Mon Apr 26 18:29:17 2010
New Revision: 8576

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8576
Log:
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.

Modified:
    linux/trunk/drivers/dahdi/voicebus/GpakApi.c
    linux/trunk/drivers/dahdi/voicebus/GpakCust.c
    linux/trunk/drivers/dahdi/voicebus/GpakCust.h

Modified: linux/trunk/drivers/dahdi/voicebus/GpakApi.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/voicebus/GpakApi.c?view=diff&rev=8576&r1=8575&r2=8576
==============================================================================
--- linux/trunk/drivers/dahdi/voicebus/GpakApi.c (original)
+++ linux/trunk/drivers/dahdi/voicebus/GpakApi.c Mon Apr 26 18:29:17 2010
@@ -102,7 +102,6 @@
 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 @@
  *   1 = Reset occurred.
  *
  */
-static int CheckDspReset(
+static int __CheckDspReset(
     int DspId               /* DSP Identifier (0 to MaxDSPCores-1) */
     )
 {
@@ -179,6 +178,20 @@
     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.

Modified: linux/trunk/drivers/dahdi/voicebus/GpakCust.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/voicebus/GpakCust.c?view=diff&rev=8576&r1=8575&r2=8576
==============================================================================
--- linux/trunk/drivers/dahdi/voicebus/GpakCust.c (original)
+++ linux/trunk/drivers/dahdi/voicebus/GpakCust.c Mon Apr 26 18:29:17 2010
@@ -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>

Modified: linux/trunk/drivers/dahdi/voicebus/GpakCust.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/voicebus/GpakCust.h?view=diff&rev=8576&r1=8575&r2=8576
==============================================================================
--- linux/trunk/drivers/dahdi/voicebus/GpakCust.h (original)
+++ linux/trunk/drivers/dahdi/voicebus/GpakCust.h Mon Apr 26 18:29:17 2010
@@ -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"




More information about the svn-commits mailing list