[svn-commits] mattf: linux/trunk r9701 - /linux/trunk/drivers/dahdi/wcb4xxp/base.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Jan 27 14:58:44 CST 2011
Author: mattf
Date: Thu Jan 27 14:58:40 2011
New Revision: 9701
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9701
Log:
Fix for bugs in timing selection when B410P card is not the first configured card in system.
Modified:
linux/trunk/drivers/dahdi/wcb4xxp/base.c
Modified: linux/trunk/drivers/dahdi/wcb4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wcb4xxp/base.c?view=diff&rev=9701&r1=9700&r2=9701
==============================================================================
--- linux/trunk/drivers/dahdi/wcb4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wcb4xxp/base.c Thu Jan 27 14:58:40 2011
@@ -1185,8 +1185,12 @@
src = -1; /* default to automatic */
for (i=0; i < b4->numspans; i++) {
+ if (DBG)
+ dev_info(&b4->pdev->dev, "Checking sync pos %d, have span %d\n", i, b4->spans[i].sync);
psrc = b4->spans[i].sync;
if (psrc > 0 && !b4->spans[psrc - 1].span.alarms) {
+ if (DBG)
+ dev_info(&b4->pdev->dev, "chosen\n");
src = psrc;
break;
}
@@ -1368,16 +1372,16 @@
}
if (s->newalarm != s->span.alarms && time_after_eq(b4->ticks, s->alarmtimer)) {
- if (!s->te_mode || !teignorered) {
- s->span.alarms = s->newalarm;
+ s->span.alarms = s->newalarm;
+ if ((!s->newalarm && teignorered) || (!teignorered)) {
dahdi_alarm_notify(&s->span);
- if (DBG_ALARM) {
- dev_info(&b4->pdev->dev,
- "span %d: alarm %d "
- "debounced\n",
- i + 1, s->newalarm);
- }
- b4xxp_set_sync_src(b4, b4xxp_find_sync(b4));
+ }
+ b4xxp_set_sync_src(b4, b4xxp_find_sync(b4));
+ if (DBG_ALARM) {
+ dev_info(&b4->pdev->dev,
+ "span %d: alarm %d "
+ "debounced\n",
+ i + 1, s->newalarm);
}
}
}
@@ -1476,7 +1480,7 @@
/* read in R_BERT_STA to determine where our current sync source is */
newsync = b4xxp_getreg8(b4, R_BERT_STA) & 0x07;
if (newsync != b4->syncspan) {
- if (printk_ratelimit()) {
+ if (printk_ratelimit() || DBG) {
dev_info(&b4->pdev->dev,
"new card sync source: port %d\n",
newsync + 1);
@@ -2315,7 +2319,7 @@
struct b4xxp *b4 = bspan->parent;
if (DBG)
- dev_info(&b4->pdev->dev, "Configuring span %d\n", span->spanno);
+ dev_info(&b4->pdev->dev, "Configuring span %d offset %d to be sync %d\n", span->spanno, span->offset, lc->sync);
#if 0
if (lc->sync > 0 && !bspan->te_mode) {
@@ -2334,13 +2338,13 @@
/* remove this span number from the current sync sources, if there */
for (i = 0; i < b4->numspans; i++) {
- if (b4->spans[i].sync == span->spanno) {
+ if (b4->spans[i].sync == (span->offset + 1)) {
b4->spans[i].sync = 0;
}
}
if (lc->sync)
- b4->spans[lc->sync - 1].sync = span->spanno;
+ b4->spans[lc->sync - 1].sync = (span->offset + 1);
b4xxp_reset_span(bspan);
More information about the svn-commits
mailing list