[svn-commits] sruffell: linux/trunk r9397 - /linux/trunk/drivers/dahdi/voicebus/voicebus.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Sep 21 14:26:26 CDT 2010


Author: sruffell
Date: Tue Sep 21 14:26:22 2010
New Revision: 9397

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9397
Log:
wcte12xp, wctdm24xxp: Do not rely on polling main memory.

The voicebus library by default configures the PCI interface to poll the
descriptor ring for available buffers.  There are some platforms like
the Intel SG3420P motherboard where this does not appear to be
sufficient.  Writing to the transmit demand poll register resolves this
problem on these troublesome platforms. DAHDI-700 DAHDI-702.

Signed-off-by: Shaun Ruffell <sruffell at digium.com>

Modified:
    linux/trunk/drivers/dahdi/voicebus/voicebus.c

Modified: linux/trunk/drivers/dahdi/voicebus/voicebus.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/voicebus/voicebus.c?view=diff&rev=9397&r1=9396&r2=9397
==============================================================================
--- linux/trunk/drivers/dahdi/voicebus/voicebus.c (original)
+++ linux/trunk/drivers/dahdi/voicebus/voicebus.c Tue Sep 21 14:26:22 2010
@@ -720,11 +720,7 @@
 	return 0;
 }
 
-/**
- * voicebus_transmit - Queue a buffer on the hardware descriptor ring.
- *
- */
-int voicebus_transmit(struct voicebus *vb, struct vbb *vbb)
+static int __voicebus_transmit(struct voicebus *vb, struct vbb *vbb)
 {
 	struct voicebus_descriptor *d;
 	struct voicebus_descriptor_list *dl = &vb->txd;
@@ -748,6 +744,17 @@
 	SET_OWNED(d); /* That's it until the hardware is done with it. */
 	atomic_inc(&dl->count);
 	return 0;
+}
+
+/**
+ * voicebus_transmit - Queue a buffer on the hardware descriptor ring.
+ *
+ */
+int voicebus_transmit(struct voicebus *vb, struct vbb *vbb)
+{
+	int res = __voicebus_transmit(vb, vbb);
+	__vb_setctl(vb, 0x0008, 0x00000000);
+	return res;
 }
 EXPORT_SYMBOL(voicebus_transmit);
 
@@ -813,8 +820,9 @@
 		while (!list_empty(&buffers)) {
 			vbb = list_entry(buffers.next, struct vbb, entry);
 			list_del_init(&vbb->entry);
-			voicebus_transmit(vb, vbb);
+			__voicebus_transmit(vb, vbb);
 		}
+		__vb_setctl(vb, 0x0008, 0x00000000);
 		vb_enable_deferred(vb);
 	}
 
@@ -1284,8 +1292,9 @@
 	while (!list_empty(&buffers)) {
 		vbb = list_entry(buffers.next, struct vbb, entry);
 		list_del(&vbb->entry);
-		voicebus_transmit(vb, vbb);
-	}
+		__voicebus_transmit(vb, vbb);
+	}
+	__vb_setctl(vb, 0x0008, 0x00000000);
 
 	/* If there may still be buffers in the descriptor rings, reschedule
 	 * ourself to run again.  We essentially yield here to allow any other
@@ -1359,8 +1368,9 @@
 	while (!list_empty(&buffers)) {
 		vbb = list_entry(buffers.next, struct vbb, entry);
 		list_del(&vbb->entry);
-		voicebus_transmit(vb, vbb);
-	}
+		__voicebus_transmit(vb, vbb);
+	}
+	__vb_setctl(vb, 0x0008, 0x00000000);
 
 	/* Print any messages about soft latency bumps after we fix the transmit
 	 * descriptor ring. Otherwise it's possible to take so much time
@@ -1504,8 +1514,9 @@
 	while (!list_empty(&buffers)) {
 		vbb = list_entry(buffers.next, struct vbb, entry);
 		list_del(&vbb->entry);
-		voicebus_transmit(vb, vbb);
-	}
+		__voicebus_transmit(vb, vbb);
+	}
+	__vb_setctl(vb, 0x0008, 0x00000000);
 
 	/* Print any messages about soft latency bumps after we fix the transmit
 	 * descriptor ring. Otherwise it's possible to take so much time




More information about the svn-commits mailing list