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

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Wed Feb 2 13:28:47 CST 2011


Author: sruffell
Date: Wed Feb  2 13:28:40 2011
New Revision: 9729

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9729
Log:
dahdi: Analog spans do not have to be marked RUNNING to become master.

Fixes a regression introduced in r9611. Analog spans would never become
the master since the SPANSTART ioctl is not typically called on them,
and therefore they were never marked RUNNING.  The result could be audio
problems.

I'm marking this as related to issue 13205 since it's generally all
related to how should the drivers select which span is the master.  I
also mark as related to issue 16165 because the problems experienced are
a result of the same fundamental issue.

(issue #13205)(issue #16165)

Reported-and-Tested-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
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=9729&r1=9728&r2=9729
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Wed Feb  2 13:28:40 2011
@@ -3595,6 +3595,11 @@
 	spin_unlock_irqrestore(&chan->lock, flags);
 }
 
+static inline bool is_analog_span(const struct dahdi_span *s)
+{
+	return (s->linecompat == 0);
+}
+
 static void __dahdi_find_master_span(void)
 {
 	struct dahdi_span *s;
@@ -3606,7 +3611,8 @@
 	list_for_each_entry(s, &span_list, node) {
 		if (s->alarms)
 			continue;
-		if (!test_bit(DAHDI_FLAGBIT_RUNNING, &s->flags))
+		if (!is_analog_span(s) &&
+		    !test_bit(DAHDI_FLAGBIT_RUNNING, &s->flags))
 			continue;
 		if (!can_provide_timing(s))
 			continue;




More information about the dahdi-commits mailing list