summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wcte12xp
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
commitebe1377699bc01f76f9488f5c65a427397f3e885 (patch)
tree2ba71d120f34ddea7961fa64a3aee6de5cb1b3b1 /drivers/dahdi/wcte12xp
parent8a549f94d5b19cf3e18c6f8793855ae446ed3758 (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
Diffstat (limited to 'drivers/dahdi/wcte12xp')
-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);