[dahdi-commits] sruffell: linux/trunk r10200 - /linux/trunk/drivers/dahdi/dahdi-base.c

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Tue Sep 13 13:29:05 CDT 2011


Author: sruffell
Date: Tue Sep 13 13:28:58 2011
New Revision: 10200

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10200
Log:
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 at digium.com>

Modified:
    linux/trunk/drivers/dahdi/dahdi-base.c

Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=10200&r1=10199&r2=10200
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Tue Sep 13 13:28:58 2011
@@ -9227,12 +9227,12 @@
 	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);
 }
 




More information about the dahdi-commits mailing list