[dahdi-commits] sruffell: branch linux/sruffell/dahdi-linux-chainedvb r7328 - /linux/team/sru...

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Fri Oct 2 18:41:48 CDT 2009


Author: sruffell
Date: Fri Oct  2 18:41:36 2009
New Revision: 7328

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=7328
Log:
wip: let's see if we're seeing a hard underrun again and cleanup.

Modified:
    linux/team/sruffell/dahdi-linux-chainedvb/drivers/dahdi/voicebus/voicebus.c

Modified: linux/team/sruffell/dahdi-linux-chainedvb/drivers/dahdi/voicebus/voicebus.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/dahdi-linux-chainedvb/drivers/dahdi/voicebus/voicebus.c?view=diff&rev=7328&r1=7327&r2=7328
==============================================================================
--- linux/team/sruffell/dahdi-linux-chainedvb/drivers/dahdi/voicebus/voicebus.c (original)
+++ linux/team/sruffell/dahdi-linux-chainedvb/drivers/dahdi/voicebus/voicebus.c Fri Oct  2 18:41:36 2009
@@ -465,8 +465,6 @@
 
 	i = 0;
 	list_for_each_entry(d, &vb->txd.list, node) {
-		dev_dbg(&vb->pdev->dev, "desc: %p (next: %08x) idle: %08llx\n",
-			d->desc, d->desc->buffer2, (u64)vb->idle_vbb_dma_addr);
 		d->desc->buffer1 = vb->idle_vbb_dma_addr;
 		d->pending = vb->idle_vbb;
 		SET_OWNED(d->desc);
@@ -804,13 +802,11 @@
 
 	/* Do not overwrite a buffer that is still in progress. */
 	if (unlikely(d->desc->buffer1 != vb->idle_vbb_dma_addr)) {
-		if (debug)
-			dev_dbg(&vb->pdev->dev, "overrun d->index = %d\n", d->index);
 		voicebus_free(vb, vbb);
 		return -EFAULT;
 	}
 
-#if 0
+#if 0 /* !!!TODO!!! */
 	/* If we're on the idle buffer, but it isn't owned, we're in a
 	 * softunderrun condition that wasn't handled.
 	 */
@@ -827,9 +823,6 @@
 	d->desc->buffer2 = dl->tail->dma_addr;
 	d->desc->buffer1 = dma_map_single(&vb->pdev->dev, vbb,
 					  vb->framesize, dl->direction);
-	if (debug)
-		dev_dbg(&vb->pdev->dev, "tail->index %d tail->buffer1 %08x (vbb:%p)\n", d->index, d->desc->buffer1, vbb);
-
 
 	/* That's it until the hardware is done with it. */
 	SET_OWNED(d->desc);
@@ -894,11 +887,6 @@
 
 	if (OWNED(d->desc))
 		return NULL;
-
-	if (debug) {
-		dev_dbg(&vb->pdev->dev, "complete %d buffer1: %08x (des1: %08x)\n",
-			d->index, d->desc->buffer1, (d->desc->des1));
-	}
 
 	dma_unmap_single(&vb->pdev->dev, d->desc->buffer1,
 			 vb->framesize, dl->direction);
@@ -1342,14 +1330,10 @@
 	void *vbb;
 	int buffer_count;
 	int i;
-	const struct device *const dev = &vb->pdev->dev;
 
 	int underrun = test_bit(TX_UNDERRUN, &vb->flags);
 
 	start_vb_deferred(vb);
-
-	if (debug)
-		dev_dbg(dev, "Entering %s\n", __func__);
 
 	buffer_count = 0;
 	/* Always handle the transmit buffers first. */
@@ -1358,9 +1342,6 @@
 		++buffer_count;
 	}
 
-	if (buffer_count > 2)
-		dev_info(dev, "Stashed %d buffers\n", buffer_count);
-
 	if (unlikely(vb_check_softunderrun(vb)))
 		__vb_increase_latency(vb, vb_recover_tx_descriptor_list(vb));
 
@@ -1375,6 +1356,7 @@
 	 * drain the transmit descriptor ring which means that interrupts were
 	 * locked for DLIST_SIZE ms. */
 	if (unlikely(underrun)) {
+		HERE();
 		vb_rx_demand_poll(vb);
 		vb_tx_demand_poll(vb);
 		clear_bit(TX_UNDERRUN, &vb->flags);
@@ -1386,8 +1368,6 @@
 	}
 
 	stop_vb_deferred(vb);
-	if (debug)
-		dev_dbg(&vb->pdev->dev, "Leaving %s\n", __func__);
 }
 
 /*!




More information about the dahdi-commits mailing list