diff options
author | Shaun Ruffell <sruffell@digium.com> | 2009-03-23 23:48:22 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2009-03-23 23:48:22 +0000 |
commit | 32d6a9e6cc43e654e2a9170a58e2eac3d2b7f63a (patch) | |
tree | 47f7da21de63272eca354e5ad5867b611a1a7101 | |
parent | cce5ba73cfe1bd9d39993e33acb776c0f2641cd7 (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
-rw-r--r-- | drivers/dahdi/wctc4xxp/base.c | 7 |
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); } /** |