[svn-commits] sruffell: linux/trunk r8454 - in /linux/trunk/drivers/dahdi: voicebus/ wctdm2...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Apr 2 19:04:02 CDT 2010


Author: sruffell
Date: Fri Apr  2 19:03:58 2010
New Revision: 8454

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8454
Log:
wcte12xp: Resend both framer and VPM commands when reads may have been lost.

Latency conditions could cause the driver to misconfigure the VPM which
would result in one way audio. DAHDI-572.

Modified:
    linux/trunk/drivers/dahdi/voicebus/GpakCust.h
    linux/trunk/drivers/dahdi/wctdm24xxp/base.c
    linux/trunk/drivers/dahdi/wcte12xp/base.c

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=8454&r1=8453&r2=8454
==============================================================================
--- linux/trunk/drivers/dahdi/voicebus/GpakCust.h (original)
+++ linux/trunk/drivers/dahdi/voicebus/GpakCust.h Fri Apr  2 19:03:58 2010
@@ -161,10 +161,31 @@
 		return NULL;
 	}
 	cmd = list_entry(vpm->pending_cmds.next, struct vpmadt032_cmd, node);
-	list_move_tail(&cmd->node, &vpm->active_cmds);
+	if (cmd->desc & __VPM150M_WR)
+		list_move_tail(&cmd->node, &vpm->active_cmds);
+	else
+		list_del_init(&cmd->node);
 	spin_unlock_irqrestore(&vpm->list_lock, flags);
 	return cmd;
 }
+
+static inline void vpmadt032_resend(struct vpmadt032 *vpm)
+{
+	unsigned long flags;
+	struct vpmadt032_cmd *cmd, *temp;
+
+	BUG_ON(!vpm);
+
+	/* By moving the commands back to the pending list, they will be
+	 * transmitted when room is available */
+	spin_lock_irqsave(&vpm->list_lock, flags);
+	list_for_each_entry_safe(cmd, temp, &vpm->active_cmds, node) {
+		cmd->desc &= ~(__VPM150M_TX);
+		list_move_tail(&cmd->node, &vpm->pending_cmds);
+	}
+	spin_unlock_irqrestore(&vpm->list_lock, flags);
+}
+
 
 int vpmadt032_module_init(void);
 

Modified: linux/trunk/drivers/dahdi/wctdm24xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=8454&r1=8453&r2=8454
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/base.c Fri Apr  2 19:03:58 2010
@@ -1088,26 +1088,6 @@
 	wctdm_setreg(wc, unit + NUM_MODULES, addr, val);
 }
 
-/* TODO: this should go in the dahdi_voicebus module... */
-static inline void cmd_vpmadt032_retransmit(struct wctdm *wc)
-{
-	unsigned long flags;
-	struct vpmadt032 *vpmadt032 = wc->vpmadt032;
-	struct vpmadt032_cmd *cmd, *temp;
-
-	BUG_ON(!vpmadt032);
-
-	/* By moving the commands back to the pending list, they will be
-	 * transmitted when room is available */
-	spin_lock_irqsave(&vpmadt032->list_lock, flags);
-	list_for_each_entry_safe(cmd, temp, &vpmadt032->active_cmds, node) {
-		cmd->desc &= ~(__VPM150M_TX);
-		list_move_tail(&cmd->node, &vpmadt032->pending_cmds);
-	}
-	spin_unlock_irqrestore(&vpmadt032->list_lock, flags);
-
-}
-
 static inline void cmd_retransmit(struct wctdm *wc)
 {
 	int x,y;
@@ -1125,7 +1105,7 @@
 	spin_unlock_irqrestore(&wc->reglock, flags);
 #ifdef VPM_SUPPORT
 	if (wc->vpmadt032)
-		cmd_vpmadt032_retransmit(wc);
+		vpmadt032_resend(wc->vpmadt032);
 #endif
 }
 

Modified: linux/trunk/drivers/dahdi/wcte12xp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wcte12xp/base.c?view=diff&rev=8454&r1=8453&r2=8454
==============================================================================
--- linux/trunk/drivers/dahdi/wcte12xp/base.c (original)
+++ linux/trunk/drivers/dahdi/wcte12xp/base.c Fri Apr  2 19:03:58 2010
@@ -150,6 +150,8 @@
 	spin_lock_irqsave(&wc->cmd_list_lock, flags);
 	list_splice_init(&wc->active_cmds, &wc->pending_cmds);
 	spin_unlock_irqrestore(&wc->cmd_list_lock, flags);
+	if (wc->vpmadt032)
+		vpmadt032_resend(wc->vpmadt032);
 }
 
 static void cmd_dequeue(struct t1 *wc, unsigned char *writechunk, int eframe, int slot)




More information about the svn-commits mailing list