summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2010-02-26 23:14:40 +0000
committerShaun Ruffell <sruffell@digium.com>2010-02-26 23:14:40 +0000
commit5d00107afa202e2de98dd1c24af7565686603f89 (patch)
tree2ba71d120f34ddea7961fa64a3aee6de5cb1b3b1
parent3d414c3dc5965d427a4f73d27c3e5f2b47a2e327 (diff)
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
-rw-r--r--drivers/dahdi/wcte12xp/base.c6
1 files 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);