summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2011-09-13 18:28:58 +0000
committerShaun Ruffell <sruffell@digium.com>2011-09-13 18:28:58 +0000
commit78e2baa3e96e0810a32b5e1610356b72743a0c29 (patch)
treee8c374f8f8ef4bada45fe177963a6050948903e3
parent2fb0dec89f66ed600c46743762f2f1556de749fb (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> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10200 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);
}