diff options
Diffstat (limited to 'tor2.c')
-rwxr-xr-x | tor2.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -648,8 +648,9 @@ static int tor2_rbsbits(struct zt_chan *chan, int bits) printk("Setting bits to %d on channel %s\n", bits, chan->name); #endif if (p->tor->cardtype == TYPE_E1) { /* do it E1 way */ - if (chan->chanpos > 30) return 0; /* cant do this for chan 31 */ + if (chan->chanpos == 16) return 0; n = chan->chanpos - 1; + if (chan->chanpos > 16) n--; k = p->span; b = (n % 15) + 1; c = p->tor->txsigs[k][b]; @@ -657,7 +658,7 @@ static int tor2_rbsbits(struct zt_chan *chan, int bits) c &= (15 << m); /* keep the other nibble */ c |= (bits & 15) << (4 - m); /* put our new nibble here */ p->tor->txsigs[k][b] = c; - /* output them into the chip */ + /* output them to the chip */ t1out(p->tor,k + 1,0x40 + b,c); return 0; } @@ -1190,10 +1191,10 @@ static void tor2_intr(int irq, void *dev_id, struct pt_regs *regs) for(k = 1; k <= 4; k++) { c = t1in(tor,k,0x31 + j); rxc = c & 15; - if (rxc != tor->spans[k - 1].chans[j + 15].rxsig) { + if (rxc != tor->spans[k - 1].chans[j + 16].rxsig) { /* Check for changes in received bits */ - if (!(tor->spans[k - 1].chans[j + 15].sig & ZT_SIG_CLEAR)) - zt_rbsbits(&tor->spans[k - 1].chans[j + 15], rxc); + if (!(tor->spans[k - 1].chans[j + 16].sig & ZT_SIG_CLEAR)) + zt_rbsbits(&tor->spans[k - 1].chans[j + 16], rxc); } rxc = c >> 4; if (rxc != tor->spans[k - 1].chans[j].rxsig) { |