[svn-commits] sruffell: branch linux/sruffell/dahdi-linux-chainedvb r7308 - /linux/team/sru...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Oct 1 16:55:49 CDT 2009
Author: sruffell
Date: Thu Oct 1 16:55:38 2009
New Revision: 7308
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=7308
Log:
wip: let's let the index count up and for the owned if not the idle buffer.
Able to intitialize the modules once again. Soft bumps still aren't happening
correctly.
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=7308&r1=7307&r2=7308
==============================================================================
--- linux/team/sruffell/dahdi-linux-chainedvb/drivers/dahdi/voicebus/voicebus.c (original)
+++ linux/team/sruffell/dahdi-linux-chainedvb/drivers/dahdi/voicebus/voicebus.c Thu Oct 1 16:55:38 2009
@@ -420,9 +420,6 @@
d = kzalloc(sizeof(*d), GFP_KERNEL);
if (!d)
goto error_nomem;
-#ifdef DEBUG
- d->index = i;
-#endif
d->desc = dma_alloc_coherent(&vb->pdev->dev, sizeof(*d->desc),
&d->dma_addr, GFP_KERNEL);
@@ -455,6 +452,7 @@
{
int res;
struct voicebus_chained_descriptor *d;
+ int i;
res = vb_initialize_descriptors(vb, &vb->txd,
0xe4800000 | vb->framesize,
@@ -469,12 +467,16 @@
return -EFAULT;
}
+ 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);
+#ifdef DEBUG
+ d->index = i++;
+#endif
}
return 0;
@@ -881,12 +883,12 @@
if (d->desc->buffer1 == vb->idle_vbb_dma_addr)
return NULL;
+ if (OWNED(d->desc))
+ return NULL;
+
if (debug) {
- if ((d->desc->des1 & 0x3ff) != vb->framesize) {
- dev_dbg(&vb->pdev->dev, "*************************");
- }
- dev_dbg(&vb->pdev->dev, "complete %d buffer1: %08x (des1: %08x) (framesize: %d)\n",
- d->index, d->desc->buffer1, (d->desc->des1), vb->framesize);
+ 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,
@@ -1339,8 +1341,14 @@
int limit = DLIST_SIZE;
start_vb_deferred(vb);
+
+ if (debug)
+ dev_dbg(&vb->pdev->dev, "Entering %s\n", __func__);
/* Always handle the transmit buffers first. */
while ((vbb = vb_get_completed_txb(vb))) {
+ /* After the upper layer is done with the completed buffer, it
+ * will call voicebus_transmit to add it back to the descriptor
+ * ring itself. */
vb->handle_transmit(vbb, vb->context);
if (!(--limit))
break;
@@ -1362,7 +1370,8 @@
}
stop_vb_deferred(vb);
- /* dev_dbg(&vb->pdev->dev, "Leaving %s\n", __func__); */
+ if (debug)
+ dev_dbg(&vb->pdev->dev, "Leaving %s\n", __func__);
}
/*!
More information about the svn-commits
mailing list