From d4ee448c7ee5c0dfefb7e2b5b1d62eaa5bb6976e Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Tue, 13 Sep 2011 18:28:58 +0000 Subject: [PATCH] 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 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10200 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/dahdi-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }