summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2011-09-13 18:38:19 +0000
committerShaun Ruffell <sruffell@digium.com>2011-09-13 18:38:19 +0000
commit21fd78d97785b48bf746103e73913d28f75e3a39 (patch)
tree48b96cb8fd3923f593b04e07cc7d1d3948ba9e3a
parent13e01e98a17f3271982067582ce99335a5a05011 (diff)
dahdi: Decrease the initial coretimer delay to 4ms from 1 second.
DAHDI currently waits a second before checking if a board driver is calling dahdi_receive and switching to internal timing. Some versions of Asterisk (I was looking at 1.4.42 when writing this) only wait 300ms for a timer to expire when first starting and verifying that DAHDI is properly configured. This can result in a "ERROR[27673] asterisk.c: Asterisk has detected a problem with your DAHDI configuration and will shutdown for your protection. You have options:" message if asterisk is started soon after loading DAHDI. This change sets the inital polling interval to the same as that used during normal coretimer operation, 4ms. The interval will still be slowed to 1 second if a board driver starts calling dahdi_receive(). DAHDI-892. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10200 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10201 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/dahdi-base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
index f8c0ae1..77432fc 100644
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -9227,12 +9227,12 @@ static void coretimer_init(void)
init_timer(&core_timer.timer);
core_timer.timer.function = coretimer_func;
core_timer.start_interval = current_kernel_time();
- core_timer.timer.expires = jiffies + HZ;
atomic_set(&core_timer.count, 0);
atomic_set(&core_timer.shutdown, 0);
core_timer.interval = max(msecs_to_jiffies(DAHDI_MSECS_PER_CHUNK), 1UL);
if (core_timer.interval < (HZ/250))
core_timer.interval = (HZ/250);
+ core_timer.timer.expires = jiffies + core_timer.interval;
add_timer(&core_timer.timer);
}