diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2012-01-25 21:19:45 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2012-01-25 21:19:45 +0000 |
commit | 2ca24f82d863d4ba475079cc6cf5d2a78f5dc58d (patch) | |
tree | 2acbed6bc514c38ab0a00d6d0549bccf8ee7bd88 | |
parent | 75acff0164c908083b32cc4401ce4f9d7917e7f2 (diff) |
show Master change to/from core timer
show Master change to/from core timer if DEBUG_MAIN (GENERAL) flag is on.
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10451 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r-- | drivers/dahdi/dahdi-base.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c index eb19188..907d0f4 100644 --- a/drivers/dahdi/dahdi-base.c +++ b/drivers/dahdi/dahdi-base.c @@ -190,6 +190,7 @@ static struct core_timer { struct timer_list timer; struct timespec start_interval; unsigned long interval; + int dahdi_receive_used; atomic_t count; atomic_t shutdown; atomic_t last_count; @@ -9620,6 +9621,10 @@ static void coretimer_func(unsigned long param) /* This is the code path if a board driver is not calling * dahdi_receive, and therefore the core of dahdi needs to * perform the master span processing itself. */ + if (core_timer.dahdi_receive_used) { + core_timer.dahdi_receive_used = 0; + dahdi_dbg(GENERAL, "Master changed to core_timer\n"); + } if (!atomic_read(&core_timer.shutdown)) { mod_timer(&core_timer.timer, jiffies + @@ -9665,6 +9670,10 @@ static void coretimer_func(unsigned long param) /* It looks like a board driver is calling dahdi_receive. We * will just check again in a second. */ + if (!core_timer.dahdi_receive_used) { + core_timer.dahdi_receive_used = 1; + dahdi_dbg(GENERAL, "Master is no longer core_timer\n"); + } atomic_set(&core_timer.count, 0); atomic_set(&core_timer.last_count, 0); core_timer.start_interval = now; |