summaryrefslogtreecommitdiff
path: root/drivers/dahdi
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2009-03-23 23:48:22 +0000
committerShaun Ruffell <sruffell@digium.com>2009-03-23 23:48:22 +0000
commit5c9af24d5a76f99c4b7859060c5442ccbb647e7c (patch)
tree47f7da21de63272eca354e5ad5867b611a1a7101 /drivers/dahdi
parent1b2bbbc1c8a76a35d6c7f7db1a6509095cff7d77 (diff)
Make sure that messages sitting in the outbound queue cause the timer to
reschedule. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6218 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi')
-rw-r--r--drivers/dahdi/wctc4xxp/base.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/dahdi/wctc4xxp/base.c b/drivers/dahdi/wctc4xxp/base.c
index 262d8ed..297235d 100644
--- a/drivers/dahdi/wctc4xxp/base.c
+++ b/drivers/dahdi/wctc4xxp/base.c
@@ -3025,6 +3025,7 @@ wctc4xxp_watchdog(unsigned long data)
struct tcb *cmd, *temp;
LIST_HEAD(cmds_to_retry);
const int MAX_RETRIES = 5;
+ int reschedule_timer = 0;
service_tx_ring(wc);
@@ -3067,12 +3068,16 @@ wctc4xxp_watchdog(unsigned long data)
"still on descriptor list.\n");
cmd->timeout = jiffies + HZ/4;
wctc4xxp_transmit_demand_poll(wc);
+ reschedule_timer = 1;
}
}
}
spin_unlock(&wc->cmd_list_lock);
- wctc4xxp_send_commands(wc, &cmds_to_retry);
+ if (list_empty(&cmds_to_retry) && reschedule_timer)
+ mod_timer(&wc->watchdog, jiffies + HZ/2);
+ else if (!list_empty(&cmds_to_retry))
+ wctc4xxp_send_commands(wc, &cmds_to_retry);
}
/**