From 5d00107afa202e2de98dd1c24af7565686603f89 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Fri, 26 Feb 2010 23:14:40 +0000 Subject: wcte12xp: Fix for a couple of issues introduced in recent commits. handle_transmit was clearing out the wrong size value and checking for timeouts wasn't handled correctly. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8156 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/wcte12xp/base.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c index f88b042..4963af2 100644 --- a/drivers/dahdi/wcte12xp/base.c +++ b/drivers/dahdi/wcte12xp/base.c @@ -576,7 +576,7 @@ static int t1_getreg(struct t1 *wc, int addr) cmd->flags = __CMD_RD; submit_cmd(wc, cmd); ret = wait_for_completion_timeout(&cmd->complete, HZ/5); - if (unlikely(ret)) { + if (unlikely(!ret)) { if (printk_ratelimit()) { dev_warn(&wc->vb.pdev->dev, "Timeout in %s\n", __func__); @@ -616,7 +616,7 @@ static inline int t1_getpins(struct t1 *wc, int inisr) cmd->flags = __CMD_PINS; submit_cmd(wc, cmd); ret = wait_for_completion_timeout(&cmd->complete, HZ/5); - if (unlikely(ret)) { + if (unlikely(!ret)) { if (printk_ratelimit()) { dev_warn(&wc->vb.pdev->dev, "Timeout in %s\n", __func__); @@ -1750,7 +1750,7 @@ static void t1_handle_transmit(struct voicebus *vb, struct list_head *buffers) struct vbb *vbb; list_for_each_entry(vbb, buffers, entry) { - memset(vbb, 0, SFRAME_SIZE); + memset(vbb->data, 0, sizeof(vbb->data)); atomic_inc(&wc->txints); t1_transmitprep(wc, vbb->data); handle_leds(wc); -- cgit v1.2.3