[svn-commits] tzafrir: linux/trunk r10373 - /linux/trunk/drivers/dahdi/xpp/card_bri.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Dec 7 13:34:41 CST 2011
Author: tzafrir
Date: Wed Dec 7 13:34:37 2011
New Revision: 10373
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10373
Log:
xpp: BRI: fix timing priority calculation
Use similar caculation as in the PRI module:
* Save timing_priority from spanconfig and
elect syncer when spanconfig is called.
* Create custom timing_priority() function that returns
the value or error if span is disconnected.
Signed-off-by: Oron Peled <oron.peled at xorcom.com>
Acked-by: : Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Modified:
linux/trunk/drivers/dahdi/xpp/card_bri.c
Modified: linux/trunk/drivers/dahdi/xpp/card_bri.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_bri.c?view=diff&rev=10373&r1=10372&r2=10373
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_bri.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_bri.c Wed Dec 7 13:34:37 2011
@@ -1202,6 +1202,8 @@
framingstr, codingstr, crcstr,
lc->lineconfig,
lc->sync);
+ PHONEDEV(xpd).timing_priority = lc->sync;
+ elect_syncer("BRI-spanconfig");
/*
* FIXME: validate
*/
@@ -1427,6 +1429,18 @@
XPD_COUNTER(tmp_xpd, PCM_READ)++;
spin_unlock_irqrestore(&tmp_xpd->lock, flags);
}
+}
+
+static int BRI_timing_priority(xpd_t *xpd)
+{
+ struct BRI_priv_data *priv;
+
+ priv = xpd->priv;
+ BUG_ON(!priv);
+ if (priv->layer1_up)
+ return PHONEDEV(xpd).timing_priority;
+ XPD_DBG(SYNC, xpd, "No timing priority (no layer1)\n");
+ return -ENOENT;
}
int BRI_echocancel_timeslot(xpd_t *xpd, int pos)
@@ -1696,7 +1710,7 @@
.card_pcm_recompute = BRI_card_pcm_recompute,
.card_pcm_fromspan = BRI_card_pcm_fromspan,
.card_pcm_tospan = BRI_card_pcm_tospan,
- .card_timing_priority = generic_timing_priority,
+ .card_timing_priority = BRI_timing_priority,
.echocancel_timeslot = BRI_echocancel_timeslot,
.echocancel_setmask = BRI_echocancel_setmask,
.card_ioctl = BRI_card_ioctl,
More information about the svn-commits
mailing list