summaryrefslogtreecommitdiff
path: root/wct1xxp.c
diff options
context:
space:
mode:
authormarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2003-10-30 17:53:23 +0000
committermarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2003-10-30 17:53:23 +0000
commit3e29b66d03ecccd8ce6c4f95d75a47afc603aa23 (patch)
tree64edc82494b75e397b41c67dbf5000f978d9f7bd /wct1xxp.c
parent398f396e0f94fb6009a3b27ffbae417becee566b (diff)
Resync T1 rather than trying to adjust for new offset
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@261 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wct1xxp.c')
-rwxr-xr-xwct1xxp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/wct1xxp.c b/wct1xxp.c
index 8f36d5a..6f88672 100755
--- a/wct1xxp.c
+++ b/wct1xxp.c
@@ -912,9 +912,11 @@ static void t1xxp_receiveprep(struct t1xxp *wc, int ints)
for (x=3;x<32;x+=4) {
if (rxbuf[32 * y + ((x + WC_OFFSET) & 0x1f)] == 0x7f) {
if (wc->offset != (x-3)) {
- wc->offset = x - 3;
+ /* Resync */
+ control_set_reg(wc, WC_CLOCK, 0x02 | wc->sync | wc->ise1);
+ wc->clocktimeout = 100;
#if 1
- if (debug) printk("New offset: %d\n", wc->offset);
+ if (debug) printk("T1: Lost our place, resyncing\n", wc->offset);
#endif
}
}