summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wcte12xp/base.c
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/wcte12xp/base.c
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/wcte12xp/base.c')
-rw-r--r--drivers/dahdi/wcte12xp/base.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c
index 9f6352f..7d0a8c7 100644
--- a/drivers/dahdi/wcte12xp/base.c
+++ b/drivers/dahdi/wcte12xp/base.c
@@ -1742,20 +1742,25 @@ static inline void t1_receiveprep(struct t1 *wc, unsigned char* readchunk)
}
}
-static void t1_handle_transmit(struct voicebus *vb, void *vbb)
+static void t1_handle_transmit(struct voicebus *vb, struct list_head *buffers)
{
struct t1 *wc = container_of(vb, struct t1, vb);
- memset(vbb, 0, SFRAME_SIZE);
- atomic_inc(&wc->txints);
- t1_transmitprep(wc, vbb);
- voicebus_transmit(&wc->vb, vbb);
- handle_leds(wc);
+ struct vbb *vbb;
+
+ list_for_each_entry(vbb, buffers, entry) {
+ memset(vbb, 0, SFRAME_SIZE);
+ atomic_inc(&wc->txints);
+ t1_transmitprep(wc, vbb->data);
+ handle_leds(wc);
+ }
}
-static void t1_handle_receive(struct voicebus *vb, void* vbb)
+static void t1_handle_receive(struct voicebus *vb, struct list_head *buffers)
{
struct t1 *wc = container_of(vb, struct t1, vb);
- t1_receiveprep(wc, vbb);
+ struct vbb *vbb;
+ list_for_each_entry(vbb, buffers, entry)
+ t1_receiveprep(wc, vbb->data);
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)