summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2011-01-21 05:29:56 +0000
committerShaun Ruffell <sruffell@digium.com>2011-01-21 05:29:56 +0000
commit83cfd371c2b6d0a7ef5443c68bd620b76f7dfbd2 (patch)
tree4a0ae7b24bf64c7583401b2850e4ccbdc6239131
parentf4aa885076cf1e7d07b7bffd989e339f7bcb4c19 (diff)
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@digium.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=9397 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@9672 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/voicebus/voicebus.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/drivers/dahdi/voicebus/voicebus.c b/drivers/dahdi/voicebus/voicebus.c
index f922484..d133006 100644
--- a/drivers/dahdi/voicebus/voicebus.c
+++ b/drivers/dahdi/voicebus/voicebus.c
@@ -717,11 +717,7 @@ vb_submit_rxb(struct voicebus *vb, struct vbb *vbb)
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;
@@ -746,6 +742,17 @@ int voicebus_transmit(struct voicebus *vb, struct vbb *vbb)
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);
@@ -810,8 +817,9 @@ static void setup_descriptors(struct voicebus *vb)
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);
}
@@ -1281,8 +1289,9 @@ static void vb_tasklet_boot(unsigned long data)
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
@@ -1356,8 +1365,9 @@ static void vb_tasklet_hx8(unsigned long data)
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
@@ -1501,8 +1511,9 @@ static void vb_tasklet_normal(unsigned long data)
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