aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax
diff options
context:
space:
mode:
authorKarsten Keil <keil@b1-systems.de>2009-07-08 14:31:42 -0400
committerKarsten Keil <keil@b1-systems.de>2009-07-25 14:16:01 -0400
commitc38fc3bc2ecddd4f5278131603e6964cbed071b2 (patch)
tree3821cf2fc6226375bbbf8c338316eef33f5b899d /drivers/isdn/hisax
parent6bd4bcd3cd8affc09eaee7efbc037f65f4a71501 (diff)
ISDN: Add support for none reverse bitstreams to isdnhdc
The original isdnhdlc code was developed for devices which had reversed bitorder in the byte stream. Adding code to handle normal bitstreams as well. Signed-off-by: Karsten Keil <keil@b1-systems.de>
Diffstat (limited to 'drivers/isdn/hisax')
-rw-r--r--drivers/isdn/hisax/st5481_b.c5
-rw-r--r--drivers/isdn/hisax/st5481_d.c2
-rw-r--r--drivers/isdn/hisax/st5481_usb.c11
3 files changed, 12 insertions, 6 deletions
diff --git a/drivers/isdn/hisax/st5481_b.c b/drivers/isdn/hisax/st5481_b.c
index 0074b600a0ef..95b1cdd97958 100644
--- a/drivers/isdn/hisax/st5481_b.c
+++ b/drivers/isdn/hisax/st5481_b.c
@@ -218,7 +218,10 @@ static void st5481B_mode(struct st5481_bcs *bcs, int mode)
218 if (bcs->mode != L1_MODE_NULL) { 218 if (bcs->mode != L1_MODE_NULL) {
219 // Open the B channel 219 // Open the B channel
220 if (bcs->mode != L1_MODE_TRANS) { 220 if (bcs->mode != L1_MODE_TRANS) {
221 isdnhdlc_out_init(&b_out->hdlc_state, 0, bcs->mode == L1_MODE_HDLC_56K); 221 u32 features = HDLC_BITREVERSE;
222 if (bcs->mode == L1_MODE_HDLC_56K)
223 features |= HDLC_56KBIT;
224 isdnhdlc_out_init(&b_out->hdlc_state, features);
222 } 225 }
223 st5481_usb_pipe_reset(adapter, (bcs->channel+1)*2, NULL, NULL); 226 st5481_usb_pipe_reset(adapter, (bcs->channel+1)*2, NULL, NULL);
224 227
diff --git a/drivers/isdn/hisax/st5481_d.c b/drivers/isdn/hisax/st5481_d.c
index 077991c1cd05..39e8e49cfd2d 100644
--- a/drivers/isdn/hisax/st5481_d.c
+++ b/drivers/isdn/hisax/st5481_d.c
@@ -417,7 +417,7 @@ static void dout_start_xmit(struct FsmInst *fsm, int event, void *arg)
417 417
418 DBG(2,"len=%d",skb->len); 418 DBG(2,"len=%d",skb->len);
419 419
420 isdnhdlc_out_init(&d_out->hdlc_state, 1, 0); 420 isdnhdlc_out_init(&d_out->hdlc_state, HDLC_DCHANNEL | HDLC_BITREVERSE);
421 421
422 if (test_and_set_bit(buf_nr, &d_out->busy)) { 422 if (test_and_set_bit(buf_nr, &d_out->busy)) {
423 WARNING("ep %d urb %d busy %#lx", EP_D_OUT, buf_nr, d_out->busy); 423 WARNING("ep %d urb %d busy %#lx", EP_D_OUT, buf_nr, d_out->busy);
diff --git a/drivers/isdn/hisax/st5481_usb.c b/drivers/isdn/hisax/st5481_usb.c
index 2b3a055059ea..10d41c5d73ed 100644
--- a/drivers/isdn/hisax/st5481_usb.c
+++ b/drivers/isdn/hisax/st5481_usb.c
@@ -637,10 +637,13 @@ void st5481_in_mode(struct st5481_in *in, int mode)
637 usb_unlink_urb(in->urb[1]); 637 usb_unlink_urb(in->urb[1]);
638 638
639 if (in->mode != L1_MODE_NULL) { 639 if (in->mode != L1_MODE_NULL) {
640 if (in->mode != L1_MODE_TRANS) 640 if (in->mode != L1_MODE_TRANS) {
641 isdnhdlc_rcv_init(&in->hdlc_state, 641 u32 features = HDLC_BITREVERSE;
642 in->mode == L1_MODE_HDLC_56K); 642
643 643 if (in->mode == L1_MODE_HDLC_56K)
644 features |= HDLC_56KBIT;
645 isdnhdlc_rcv_init(&in->hdlc_state, features);
646 }
644 st5481_usb_pipe_reset(in->adapter, in->ep, NULL, NULL); 647 st5481_usb_pipe_reset(in->adapter, in->ep, NULL, NULL);
645 st5481_usb_device_ctrl_msg(in->adapter, in->counter, 648 st5481_usb_device_ctrl_msg(in->adapter, in->counter,
646 in->packet_size, 649 in->packet_size,