summaryrefslogtreecommitdiff
path: root/drivers/dahdi/vpmadt032_loader
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2010-02-25 17:33:58 +0000
committerShaun Ruffell <sruffell@digium.com>2010-02-25 17:33:58 +0000
commit36b4f0072fd8f20a7b3f46f917b7d5af86fceb7b (patch)
tree91b3cb5df3309772ad6fb9584f73a25d156c4996 /drivers/dahdi/vpmadt032_loader
parent9a449e1df5edc16fda2c47afe68e8e5cf54026ee (diff)
wctdm24xxp, wcte12xp: Buffer handling improvements.
This patch moves the majority of the buffer processing for the voicebus based cards out of the interrupt handler and into a tasklet. When multiple cards are running on the same CPU, and there was a latency condition that would cause them to get behind, this now allows the tasklet to limit how many buffers are processed on each card before giving the other card a chance to start working on it's backlog. Additionally, when the card detects a hard under run, instead of trying to fix it up in the handling routine, it will now reschedule a work item that will completely reset the descriptor rings. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8095 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/vpmadt032_loader')
-rw-r--r--drivers/dahdi/vpmadt032_loader/dahdi_vpmadt032_loader.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/dahdi/vpmadt032_loader/dahdi_vpmadt032_loader.c b/drivers/dahdi/vpmadt032_loader/dahdi_vpmadt032_loader.c
index 04046bd..be43780 100644
--- a/drivers/dahdi/vpmadt032_loader/dahdi_vpmadt032_loader.c
+++ b/drivers/dahdi/vpmadt032_loader/dahdi_vpmadt032_loader.c
@@ -75,19 +75,23 @@ static void init_private_context(struct private_context *ctx)
init_completion(&ctx->done);
}
-static void handle_receive(struct voicebus *vb, void *vbb)
+static void handle_receive(struct voicebus *vb, struct list_head *buffers)
{
struct private_context *ctx = pci_get_drvdata(vb->pdev);
- __vpmadt032_receive(ctx->pvt, vbb);
- if (__vpmadt032_done(ctx->pvt))
- complete(&ctx->done);
+ struct vbb *vbb;
+ list_for_each_entry(vbb, buffers, entry) {
+ __vpmadt032_receive(ctx->pvt, vbb->data);
+ if (__vpmadt032_done(ctx->pvt))
+ complete(&ctx->done);
+ }
}
-static void handle_transmit(struct voicebus *vb, void *vbb)
+static void handle_transmit(struct voicebus *vb, struct list_head *buffers)
{
+ struct vbb *vbb;
struct private_context *ctx = pci_get_drvdata(vb->pdev);
- __vpmadt032_transmit(ctx->pvt, vbb);
- voicebus_transmit(ctx->vb, vbb);
+ list_for_each_entry(vbb, buffers, entry)
+ __vpmadt032_transmit(ctx->pvt, vbb->data);
}
static const struct voicebus_operations loader_operations = {