diff options
author | Shaun Ruffell <sruffell@digium.com> | 2011-01-03 13:06:54 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2011-01-03 13:06:54 +0000 |
commit | 830fbd7be960c62816c92ce9d8a0809fe635a20e (patch) | |
tree | a02046348132d7cfed4f34313e68c38ac74477b1 /drivers | |
parent | ad3aaef4d31dca706277e1da8802abd3798a779f (diff) |
wcb4xxp: HDLC packets do not pass over D-channel.
dahdi/wcb4xxp driver used with Digium Wildcard B410 quad-BRI PCI card
unable to communicate with another ISDN device (ISDN phone, another port
of B410). It appears that B-channels are capable to transport data, but
D-channel is not.
Debug output added into the driver shows that packets are transmitted to
the D-channel, but no packets are received. Further investigation shows
that no interrupts received from Rx FIFO associated with D-channel,
although packets are delivered to the FIFO. I've found that problem is
in improper usage of chan->chanpos while indexing the fifo index
(bspan->fifos): chanpos starts from 1 and fifos starts from 0.
Therefore, garbage read instead of fifo number.
(closes issue #14834)
Reported by: vvv
Patches:
dahdi-linux-complete-2.2.0-rc1.patch uploaded by vvv (license 741)
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9555 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dahdi/wcb4xxp/base.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/dahdi/wcb4xxp/base.c b/drivers/dahdi/wcb4xxp/base.c index 3e7f7da..6fbf44d 100644 --- a/drivers/dahdi/wcb4xxp/base.c +++ b/drivers/dahdi/wcb4xxp/base.c @@ -1902,8 +1902,10 @@ static int hdlc_tx_frame(struct b4xxp_span *bspan) for (i=0; i < size; i++) printk("%02x%c", buf[i], (i < (size - 1)) ? ' ' : '\n'); - if (size && res != 0) - pr_info("Transmitted frame %d on span %d\n", bspan->frames_out - 1, bspan->port); + if (size && res != 0) { + pr_info("Transmitted frame %d on span %d\n", + bspan->frames_out - 1, bspan->port + 1); + } } return(res == 0); @@ -2403,7 +2405,7 @@ static int b4xxp_open(struct dahdi_chan *chan) chan->name, chan->channo, chan->chanpos); } - hfc_reset_fifo_pair(b4, bspan->fifos[chan->chanpos], 0, 0); + hfc_reset_fifo_pair(b4, bspan->fifos[chan->chanpos - 1], 0, 0); return 0; } @@ -2418,7 +2420,7 @@ static int b4xxp_close(struct dahdi_chan *chan) chan->name, chan->channo, chan->chanpos); } - hfc_reset_fifo_pair(b4, bspan->fifos[chan->chanpos], 1, 1); + hfc_reset_fifo_pair(b4, bspan->fifos[chan->chanpos - 1], 1, 1); return 0; } |