aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hardware/mISDN/mISDNisar.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-02-19 22:52:38 -0500
committerJoe Perches <joe@perches.com>2012-02-21 12:04:01 -0500
commit475be4d85a274d0961593db41cf85689db1d583c (patch)
treeb2b8931eb747794730522c3cf1898e46948527b9 /drivers/isdn/hardware/mISDN/mISDNisar.c
parent0b0a635f79f91f3755b6518627ea06dd0dbfd523 (diff)
isdn: whitespace coding style cleanup
isdn source code uses a not-current coding style. Update the coding style used on a per-line basis so that git diff -w shows only elided blank lines at EOF. Done with emacs and some scripts and some typing. Built x86 allyesconfig. No detected change in objdump -d or size. Signed-off-by: Joe Perches <joe@perches.com>
Diffstat (limited to 'drivers/isdn/hardware/mISDN/mISDNisar.c')
-rw-r--r--drivers/isdn/hardware/mISDN/mISDNisar.c208
1 files changed, 104 insertions, 104 deletions
diff --git a/drivers/isdn/hardware/mISDN/mISDNisar.c b/drivers/isdn/hardware/mISDN/mISDNisar.c
index 7034af28d464..10446ab404b5 100644
--- a/drivers/isdn/hardware/mISDN/mISDNisar.c
+++ b/drivers/isdn/hardware/mISDN/mISDNisar.c
@@ -42,7 +42,7 @@ MODULE_VERSION(ISAR_REV);
42 42
43static const u8 faxmodulation_s[] = "3,24,48,72,73,74,96,97,98,121,122,145,146"; 43static const u8 faxmodulation_s[] = "3,24,48,72,73,74,96,97,98,121,122,145,146";
44static const u8 faxmodulation[] = {3, 24, 48, 72, 73, 74, 96, 97, 98, 121, 44static const u8 faxmodulation[] = {3, 24, 48, 72, 73, 74, 96, 97, 98, 121,
45 122, 145, 146}; 45 122, 145, 146};
46#define FAXMODCNT 13 46#define FAXMODCNT 13
47 47
48static void isar_setup(struct isar_hw *); 48static void isar_setup(struct isar_hw *);
@@ -84,9 +84,9 @@ send_mbox(struct isar_hw *isar, u8 his, u8 creg, u8 len, u8 *msg)
84 84
85 while (l < (int)len) { 85 while (l < (int)len) {
86 hex_dump_to_buffer(msg + l, len - l, 32, 1, 86 hex_dump_to_buffer(msg + l, len - l, 32, 1,
87 isar->log, 256, 1); 87 isar->log, 256, 1);
88 pr_debug("%s: %s %02x: %s\n", isar->name, 88 pr_debug("%s: %s %02x: %s\n", isar->name,
89 __func__, l, isar->log); 89 __func__, l, isar->log);
90 l += 32; 90 l += 32;
91 } 91 }
92 } 92 }
@@ -113,9 +113,9 @@ rcv_mbox(struct isar_hw *isar, u8 *msg)
113 113
114 while (l < (int)isar->clsb) { 114 while (l < (int)isar->clsb) {
115 hex_dump_to_buffer(msg + l, isar->clsb - l, 32, 115 hex_dump_to_buffer(msg + l, isar->clsb - l, 32,
116 1, isar->log, 256, 1); 116 1, isar->log, 256, 1);
117 pr_debug("%s: %s %02x: %s\n", isar->name, 117 pr_debug("%s: %s %02x: %s\n", isar->name,
118 __func__, l, isar->log); 118 __func__, l, isar->log);
119 l += 32; 119 l += 32;
120 } 120 }
121 } 121 }
@@ -130,7 +130,7 @@ get_irq_infos(struct isar_hw *isar)
130 isar->cmsb = isar->read_reg(isar->hw, ISAR_CTRL_H); 130 isar->cmsb = isar->read_reg(isar->hw, ISAR_CTRL_H);
131 isar->clsb = isar->read_reg(isar->hw, ISAR_CTRL_L); 131 isar->clsb = isar->read_reg(isar->hw, ISAR_CTRL_L);
132 pr_debug("%s: rcv_mbox(%02x,%02x,%d)\n", isar->name, 132 pr_debug("%s: rcv_mbox(%02x,%02x,%d)\n", isar->name,
133 isar->iis, isar->cmsb, isar->clsb); 133 isar->iis, isar->cmsb, isar->clsb);
134} 134}
135 135
136/* 136/*
@@ -154,7 +154,7 @@ poll_mbox(struct isar_hw *isar, int maxdelay)
154 rcv_mbox(isar, NULL); 154 rcv_mbox(isar, NULL);
155 } 155 }
156 pr_debug("%s: pulled %d bytes after %d us\n", 156 pr_debug("%s: pulled %d bytes after %d us\n",
157 isar->name, isar->clsb, maxdelay - t); 157 isar->name, isar->clsb, maxdelay - t);
158 return t; 158 return t;
159} 159}
160 160
@@ -200,13 +200,13 @@ load_firmware(struct isar_hw *isar, const u8 *buf, int size)
200 200
201 if (1 != isar->version) { 201 if (1 != isar->version) {
202 pr_err("%s: ISAR wrong version %d firmware download aborted\n", 202 pr_err("%s: ISAR wrong version %d firmware download aborted\n",
203 isar->name, isar->version); 203 isar->name, isar->version);
204 return -EINVAL; 204 return -EINVAL;
205 } 205 }
206 if (!(saved_debug & DEBUG_HW_FIRMWARE_FIFO)) 206 if (!(saved_debug & DEBUG_HW_FIRMWARE_FIFO))
207 isar->ch[0].bch.debug &= ~DEBUG_HW_BFIFO; 207 isar->ch[0].bch.debug &= ~DEBUG_HW_BFIFO;
208 pr_debug("%s: load firmware %d words (%d bytes)\n", 208 pr_debug("%s: load firmware %d words (%d bytes)\n",
209 isar->name, size/2, size); 209 isar->name, size / 2, size);
210 cnt = 0; 210 cnt = 0;
211 size /= 2; 211 size /= 2;
212 /* disable ISAR IRQ */ 212 /* disable ISAR IRQ */
@@ -219,7 +219,7 @@ load_firmware(struct isar_hw *isar, const u8 *buf, int size)
219 blk_head.d_key = le16_to_cpu(*sp++); 219 blk_head.d_key = le16_to_cpu(*sp++);
220 cnt += 3; 220 cnt += 3;
221 pr_debug("ISAR firmware block (%#x,%d,%#x)\n", 221 pr_debug("ISAR firmware block (%#x,%d,%#x)\n",
222 blk_head.sadr, blk_head.len, blk_head.d_key & 0xff); 222 blk_head.sadr, blk_head.len, blk_head.d_key & 0xff);
223 left = blk_head.len; 223 left = blk_head.len;
224 if (cnt + left > size) { 224 if (cnt + left > size) {
225 pr_info("%s: firmware error have %d need %d words\n", 225 pr_info("%s: firmware error have %d need %d words\n",
@@ -229,7 +229,7 @@ load_firmware(struct isar_hw *isar, const u8 *buf, int size)
229 } 229 }
230 spin_lock_irqsave(isar->hwlock, flags); 230 spin_lock_irqsave(isar->hwlock, flags);
231 if (!send_mbox(isar, ISAR_HIS_DKEY, blk_head.d_key & 0xff, 231 if (!send_mbox(isar, ISAR_HIS_DKEY, blk_head.d_key & 0xff,
232 0, NULL)) { 232 0, NULL)) {
233 pr_info("ISAR send_mbox dkey failed\n"); 233 pr_info("ISAR send_mbox dkey failed\n");
234 ret = -ETIME; 234 ret = -ETIME;
235 goto reterror; 235 goto reterror;
@@ -260,7 +260,7 @@ load_firmware(struct isar_hw *isar, const u8 *buf, int size)
260 cnt += noc; 260 cnt += noc;
261 *mp++ = noc; 261 *mp++ = noc;
262 pr_debug("%s: load %3d words at %04x\n", isar->name, 262 pr_debug("%s: load %3d words at %04x\n", isar->name,
263 noc, blk_head.sadr); 263 noc, blk_head.sadr);
264 blk_head.sadr += noc; 264 blk_head.sadr += noc;
265 while (noc) { 265 while (noc) {
266 val = le16_to_cpu(*sp++); 266 val = le16_to_cpu(*sp++);
@@ -289,7 +289,7 @@ load_firmware(struct isar_hw *isar, const u8 *buf, int size)
289 } 289 }
290 } 290 }
291 pr_debug("%s: ISAR firmware block %d words loaded\n", 291 pr_debug("%s: ISAR firmware block %d words loaded\n",
292 isar->name, blk_head.len); 292 isar->name, blk_head.len);
293 } 293 }
294 isar->ch[0].bch.debug = saved_debug; 294 isar->ch[0].bch.debug = saved_debug;
295 /* 10ms delay */ 295 /* 10ms delay */
@@ -333,7 +333,7 @@ load_firmware(struct isar_hw *isar, const u8 *buf, int size)
333 goto reterrflg; 333 goto reterrflg;
334 } else 334 } else
335 pr_debug("%s: ISAR general status event %x\n", 335 pr_debug("%s: ISAR general status event %x\n",
336 isar->name, isar->bstat); 336 isar->name, isar->bstat);
337 /* 10ms delay */ 337 /* 10ms delay */
338 cnt = 10; 338 cnt = 10;
339 while (cnt--) 339 while (cnt--)
@@ -387,7 +387,7 @@ load_firmware(struct isar_hw *isar, const u8 *buf, int size)
387 } else { 387 } else {
388 if ((isar->cmsb == ISAR_CTRL_SWVER) && (isar->clsb == 1)) { 388 if ((isar->cmsb == ISAR_CTRL_SWVER) && (isar->clsb == 1)) {
389 pr_notice("%s: ISAR software version %#x\n", 389 pr_notice("%s: ISAR software version %#x\n",
390 isar->name, isar->buf[0]); 390 isar->name, isar->buf[0]);
391 } else { 391 } else {
392 pr_info("%s: ISAR wrong swver response (%x,%x)" 392 pr_info("%s: ISAR wrong swver response (%x,%x)"
393 " cnt(%d)\n", isar->name, isar->cmsb, 393 " cnt(%d)\n", isar->name, isar->cmsb,
@@ -431,7 +431,7 @@ isar_rcv_frame(struct isar_ch *ch)
431 switch (ch->bch.state) { 431 switch (ch->bch.state) {
432 case ISDN_P_NONE: 432 case ISDN_P_NONE:
433 pr_debug("%s: ISAR protocol 0 spurious IIS_RDATA %x/%x/%x\n", 433 pr_debug("%s: ISAR protocol 0 spurious IIS_RDATA %x/%x/%x\n",
434 ch->is->name, ch->is->iis, ch->is->cmsb, ch->is->clsb); 434 ch->is->name, ch->is->iis, ch->is->cmsb, ch->is->clsb);
435 ch->is->write_reg(ch->is->hw, ISAR_IIA, 0); 435 ch->is->write_reg(ch->is->hw, ISAR_IIA, 0);
436 break; 436 break;
437 case ISDN_P_B_RAW: 437 case ISDN_P_B_RAW:
@@ -439,7 +439,7 @@ isar_rcv_frame(struct isar_ch *ch)
439 case ISDN_P_B_MODEM_ASYNC: 439 case ISDN_P_B_MODEM_ASYNC:
440 if (!ch->bch.rx_skb) { 440 if (!ch->bch.rx_skb) {
441 ch->bch.rx_skb = mI_alloc_skb(ch->bch.maxlen, 441 ch->bch.rx_skb = mI_alloc_skb(ch->bch.maxlen,
442 GFP_ATOMIC); 442 GFP_ATOMIC);
443 if (unlikely(!ch->bch.rx_skb)) { 443 if (unlikely(!ch->bch.rx_skb)) {
444 pr_info("%s: B receive out of memory\n", 444 pr_info("%s: B receive out of memory\n",
445 ch->is->name); 445 ch->is->name);
@@ -453,7 +453,7 @@ isar_rcv_frame(struct isar_ch *ch)
453 case ISDN_P_B_HDLC: 453 case ISDN_P_B_HDLC:
454 if (!ch->bch.rx_skb) { 454 if (!ch->bch.rx_skb) {
455 ch->bch.rx_skb = mI_alloc_skb(ch->bch.maxlen, 455 ch->bch.rx_skb = mI_alloc_skb(ch->bch.maxlen,
456 GFP_ATOMIC); 456 GFP_ATOMIC);
457 if (unlikely(!ch->bch.rx_skb)) { 457 if (unlikely(!ch->bch.rx_skb)) {
458 pr_info("%s: B receive out of memory\n", 458 pr_info("%s: B receive out of memory\n",
459 ch->is->name); 459 ch->is->name);
@@ -464,14 +464,14 @@ isar_rcv_frame(struct isar_ch *ch)
464 if ((ch->bch.rx_skb->len + ch->is->clsb) > 464 if ((ch->bch.rx_skb->len + ch->is->clsb) >
465 (ch->bch.maxlen + 2)) { 465 (ch->bch.maxlen + 2)) {
466 pr_debug("%s: incoming packet too large\n", 466 pr_debug("%s: incoming packet too large\n",
467 ch->is->name); 467 ch->is->name);
468 ch->is->write_reg(ch->is->hw, ISAR_IIA, 0); 468 ch->is->write_reg(ch->is->hw, ISAR_IIA, 0);
469 skb_trim(ch->bch.rx_skb, 0); 469 skb_trim(ch->bch.rx_skb, 0);
470 break; 470 break;
471 } 471 }
472 if (ch->is->cmsb & HDLC_ERROR) { 472 if (ch->is->cmsb & HDLC_ERROR) {
473 pr_debug("%s: ISAR frame error %x len %d\n", 473 pr_debug("%s: ISAR frame error %x len %d\n",
474 ch->is->name, ch->is->cmsb, ch->is->clsb); 474 ch->is->name, ch->is->cmsb, ch->is->clsb);
475#ifdef ERROR_STATISTIC 475#ifdef ERROR_STATISTIC
476 if (ch->is->cmsb & HDLC_ERR_RER) 476 if (ch->is->cmsb & HDLC_ERR_RER)
477 ch->bch.err_inv++; 477 ch->bch.err_inv++;
@@ -489,7 +489,7 @@ isar_rcv_frame(struct isar_ch *ch)
489 if (ch->is->cmsb & HDLC_FED) { 489 if (ch->is->cmsb & HDLC_FED) {
490 if (ch->bch.rx_skb->len < 3) { /* last 2 are the FCS */ 490 if (ch->bch.rx_skb->len < 3) { /* last 2 are the FCS */
491 pr_debug("%s: ISAR frame to short %d\n", 491 pr_debug("%s: ISAR frame to short %d\n",
492 ch->is->name, ch->bch.rx_skb->len); 492 ch->is->name, ch->bch.rx_skb->len);
493 skb_trim(ch->bch.rx_skb, 0); 493 skb_trim(ch->bch.rx_skb, 0);
494 break; 494 break;
495 } 495 }
@@ -500,7 +500,7 @@ isar_rcv_frame(struct isar_ch *ch)
500 case ISDN_P_B_T30_FAX: 500 case ISDN_P_B_T30_FAX:
501 if (ch->state != STFAX_ACTIV) { 501 if (ch->state != STFAX_ACTIV) {
502 pr_debug("%s: isar_rcv_frame: not ACTIV\n", 502 pr_debug("%s: isar_rcv_frame: not ACTIV\n",
503 ch->is->name); 503 ch->is->name);
504 ch->is->write_reg(ch->is->hw, ISAR_IIA, 0); 504 ch->is->write_reg(ch->is->hw, ISAR_IIA, 0);
505 if (ch->bch.rx_skb) 505 if (ch->bch.rx_skb)
506 skb_trim(ch->bch.rx_skb, 0); 506 skb_trim(ch->bch.rx_skb, 0);
@@ -508,7 +508,7 @@ isar_rcv_frame(struct isar_ch *ch)
508 } 508 }
509 if (!ch->bch.rx_skb) { 509 if (!ch->bch.rx_skb) {
510 ch->bch.rx_skb = mI_alloc_skb(ch->bch.maxlen, 510 ch->bch.rx_skb = mI_alloc_skb(ch->bch.maxlen,
511 GFP_ATOMIC); 511 GFP_ATOMIC);
512 if (unlikely(!ch->bch.rx_skb)) { 512 if (unlikely(!ch->bch.rx_skb)) {
513 pr_info("%s: B receive out of memory\n", 513 pr_info("%s: B receive out of memory\n",
514 __func__); 514 __func__);
@@ -519,14 +519,14 @@ isar_rcv_frame(struct isar_ch *ch)
519 if (ch->cmd == PCTRL_CMD_FRM) { 519 if (ch->cmd == PCTRL_CMD_FRM) {
520 rcv_mbox(ch->is, skb_put(ch->bch.rx_skb, ch->is->clsb)); 520 rcv_mbox(ch->is, skb_put(ch->bch.rx_skb, ch->is->clsb));
521 pr_debug("%s: isar_rcv_frame: %d\n", 521 pr_debug("%s: isar_rcv_frame: %d\n",
522 ch->is->name, ch->bch.rx_skb->len); 522 ch->is->name, ch->bch.rx_skb->len);
523 if (ch->is->cmsb & SART_NMD) { /* ABORT */ 523 if (ch->is->cmsb & SART_NMD) { /* ABORT */
524 pr_debug("%s: isar_rcv_frame: no more data\n", 524 pr_debug("%s: isar_rcv_frame: no more data\n",
525 ch->is->name); 525 ch->is->name);
526 ch->is->write_reg(ch->is->hw, ISAR_IIA, 0); 526 ch->is->write_reg(ch->is->hw, ISAR_IIA, 0);
527 send_mbox(ch->is, SET_DPS(ch->dpath) | 527 send_mbox(ch->is, SET_DPS(ch->dpath) |
528 ISAR_HIS_PUMPCTRL, PCTRL_CMD_ESC, 528 ISAR_HIS_PUMPCTRL, PCTRL_CMD_ESC,
529 0, NULL); 529 0, NULL);
530 ch->state = STFAX_ESCAPE; 530 ch->state = STFAX_ESCAPE;
531 /* set_skb_flag(skb, DF_NOMOREDATA); */ 531 /* set_skb_flag(skb, DF_NOMOREDATA); */
532 } 532 }
@@ -537,7 +537,7 @@ isar_rcv_frame(struct isar_ch *ch)
537 } 537 }
538 if (ch->cmd != PCTRL_CMD_FRH) { 538 if (ch->cmd != PCTRL_CMD_FRH) {
539 pr_debug("%s: isar_rcv_frame: unknown fax mode %x\n", 539 pr_debug("%s: isar_rcv_frame: unknown fax mode %x\n",
540 ch->is->name, ch->cmd); 540 ch->is->name, ch->cmd);
541 ch->is->write_reg(ch->is->hw, ISAR_IIA, 0); 541 ch->is->write_reg(ch->is->hw, ISAR_IIA, 0);
542 if (ch->bch.rx_skb) 542 if (ch->bch.rx_skb)
543 skb_trim(ch->bch.rx_skb, 0); 543 skb_trim(ch->bch.rx_skb, 0);
@@ -574,12 +574,12 @@ isar_rcv_frame(struct isar_ch *ch)
574 } 574 }
575 if (ch->is->cmsb & SART_NMD) { /* ABORT */ 575 if (ch->is->cmsb & SART_NMD) { /* ABORT */
576 pr_debug("%s: isar_rcv_frame: no more data\n", 576 pr_debug("%s: isar_rcv_frame: no more data\n",
577 ch->is->name); 577 ch->is->name);
578 ch->is->write_reg(ch->is->hw, ISAR_IIA, 0); 578 ch->is->write_reg(ch->is->hw, ISAR_IIA, 0);
579 if (ch->bch.rx_skb) 579 if (ch->bch.rx_skb)
580 skb_trim(ch->bch.rx_skb, 0); 580 skb_trim(ch->bch.rx_skb, 0);
581 send_mbox(ch->is, SET_DPS(ch->dpath) | 581 send_mbox(ch->is, SET_DPS(ch->dpath) |
582 ISAR_HIS_PUMPCTRL, PCTRL_CMD_ESC, 0, NULL); 582 ISAR_HIS_PUMPCTRL, PCTRL_CMD_ESC, 0, NULL);
583 ch->state = STFAX_ESCAPE; 583 ch->state = STFAX_ESCAPE;
584 deliver_status(ch, HW_MOD_NOCARR); 584 deliver_status(ch, HW_MOD_NOCARR);
585 } 585 }
@@ -599,14 +599,14 @@ isar_fill_fifo(struct isar_ch *ch)
599 u8 *ptr; 599 u8 *ptr;
600 600
601 pr_debug("%s: ch%d tx_skb %p tx_idx %d\n", 601 pr_debug("%s: ch%d tx_skb %p tx_idx %d\n",
602 ch->is->name, ch->bch.nr, ch->bch.tx_skb, ch->bch.tx_idx); 602 ch->is->name, ch->bch.nr, ch->bch.tx_skb, ch->bch.tx_idx);
603 if (!ch->bch.tx_skb) 603 if (!ch->bch.tx_skb)
604 return; 604 return;
605 count = ch->bch.tx_skb->len - ch->bch.tx_idx; 605 count = ch->bch.tx_skb->len - ch->bch.tx_idx;
606 if (count <= 0) 606 if (count <= 0)
607 return; 607 return;
608 if (!(ch->is->bstat & 608 if (!(ch->is->bstat &
609 (ch->dpath == 1 ? BSTAT_RDM1 : BSTAT_RDM2))) 609 (ch->dpath == 1 ? BSTAT_RDM1 : BSTAT_RDM2)))
610 return; 610 return;
611 if (count > ch->mml) { 611 if (count > ch->mml) {
612 msb = 0; 612 msb = 0;
@@ -618,17 +618,17 @@ isar_fill_fifo(struct isar_ch *ch)
618 if (!ch->bch.tx_idx) { 618 if (!ch->bch.tx_idx) {
619 pr_debug("%s: frame start\n", ch->is->name); 619 pr_debug("%s: frame start\n", ch->is->name);
620 if ((ch->bch.state == ISDN_P_B_T30_FAX) && 620 if ((ch->bch.state == ISDN_P_B_T30_FAX) &&
621 (ch->cmd == PCTRL_CMD_FTH)) { 621 (ch->cmd == PCTRL_CMD_FTH)) {
622 if (count > 1) { 622 if (count > 1) {
623 if ((ptr[0] == 0xff) && (ptr[1] == 0x13)) { 623 if ((ptr[0] == 0xff) && (ptr[1] == 0x13)) {
624 /* last frame */ 624 /* last frame */
625 test_and_set_bit(FLG_LASTDATA, 625 test_and_set_bit(FLG_LASTDATA,
626 &ch->bch.Flags); 626 &ch->bch.Flags);
627 pr_debug("%s: set LASTDATA\n", 627 pr_debug("%s: set LASTDATA\n",
628 ch->is->name); 628 ch->is->name);
629 if (msb == HDLC_FED) 629 if (msb == HDLC_FED)
630 test_and_set_bit(FLG_DLEETX, 630 test_and_set_bit(FLG_DLEETX,
631 &ch->bch.Flags); 631 &ch->bch.Flags);
632 } 632 }
633 } 633 }
634 } 634 }
@@ -643,21 +643,21 @@ isar_fill_fifo(struct isar_ch *ch)
643 case ISDN_P_B_L2DTMF: 643 case ISDN_P_B_L2DTMF:
644 case ISDN_P_B_MODEM_ASYNC: 644 case ISDN_P_B_MODEM_ASYNC:
645 send_mbox(ch->is, SET_DPS(ch->dpath) | ISAR_HIS_SDATA, 645 send_mbox(ch->is, SET_DPS(ch->dpath) | ISAR_HIS_SDATA,
646 0, count, ptr); 646 0, count, ptr);
647 break; 647 break;
648 case ISDN_P_B_HDLC: 648 case ISDN_P_B_HDLC:
649 send_mbox(ch->is, SET_DPS(ch->dpath) | ISAR_HIS_SDATA, 649 send_mbox(ch->is, SET_DPS(ch->dpath) | ISAR_HIS_SDATA,
650 msb, count, ptr); 650 msb, count, ptr);
651 break; 651 break;
652 case ISDN_P_B_T30_FAX: 652 case ISDN_P_B_T30_FAX:
653 if (ch->state != STFAX_ACTIV) 653 if (ch->state != STFAX_ACTIV)
654 pr_debug("%s: not ACTIV\n", ch->is->name); 654 pr_debug("%s: not ACTIV\n", ch->is->name);
655 else if (ch->cmd == PCTRL_CMD_FTH) 655 else if (ch->cmd == PCTRL_CMD_FTH)
656 send_mbox(ch->is, SET_DPS(ch->dpath) | ISAR_HIS_SDATA, 656 send_mbox(ch->is, SET_DPS(ch->dpath) | ISAR_HIS_SDATA,
657 msb, count, ptr); 657 msb, count, ptr);
658 else if (ch->cmd == PCTRL_CMD_FTM) 658 else if (ch->cmd == PCTRL_CMD_FTM)
659 send_mbox(ch->is, SET_DPS(ch->dpath) | ISAR_HIS_SDATA, 659 send_mbox(ch->is, SET_DPS(ch->dpath) | ISAR_HIS_SDATA,
660 0, count, ptr); 660 0, count, ptr);
661 else 661 else
662 pr_debug("%s: not FTH/FTM\n", ch->is->name); 662 pr_debug("%s: not FTH/FTM\n", ch->is->name);
663 break; 663 break;
@@ -687,8 +687,8 @@ static void
687send_next(struct isar_ch *ch) 687send_next(struct isar_ch *ch)
688{ 688{
689 pr_debug("%s: %s ch%d tx_skb %p tx_idx %d\n", 689 pr_debug("%s: %s ch%d tx_skb %p tx_idx %d\n",
690 ch->is->name, __func__, ch->bch.nr, 690 ch->is->name, __func__, ch->bch.nr,
691 ch->bch.tx_skb, ch->bch.tx_idx); 691 ch->bch.tx_skb, ch->bch.tx_idx);
692 if (ch->bch.state == ISDN_P_B_T30_FAX) { 692 if (ch->bch.state == ISDN_P_B_T30_FAX) {
693 if (ch->cmd == PCTRL_CMD_FTH) { 693 if (ch->cmd == PCTRL_CMD_FTH) {
694 if (test_bit(FLG_LASTDATA, &ch->bch.Flags)) { 694 if (test_bit(FLG_LASTDATA, &ch->bch.Flags)) {
@@ -713,12 +713,12 @@ send_next(struct isar_ch *ch)
713 else { 713 else {
714 if (test_and_clear_bit(FLG_DLEETX, &ch->bch.Flags)) { 714 if (test_and_clear_bit(FLG_DLEETX, &ch->bch.Flags)) {
715 if (test_and_clear_bit(FLG_LASTDATA, 715 if (test_and_clear_bit(FLG_LASTDATA,
716 &ch->bch.Flags)) { 716 &ch->bch.Flags)) {
717 if (test_and_clear_bit(FLG_NMD_DATA, 717 if (test_and_clear_bit(FLG_NMD_DATA,
718 &ch->bch.Flags)) { 718 &ch->bch.Flags)) {
719 u8 zd = 0; 719 u8 zd = 0;
720 send_mbox(ch->is, SET_DPS(ch->dpath) | 720 send_mbox(ch->is, SET_DPS(ch->dpath) |
721 ISAR_HIS_SDATA, 0x01, 1, &zd); 721 ISAR_HIS_SDATA, 0x01, 1, &zd);
722 } 722 }
723 test_and_set_bit(FLG_LL_OK, &ch->bch.Flags); 723 test_and_set_bit(FLG_LL_OK, &ch->bch.Flags);
724 } else { 724 } else {
@@ -738,7 +738,7 @@ check_send(struct isar_hw *isar, u8 rdm)
738 ch = sel_bch_isar(isar, 1); 738 ch = sel_bch_isar(isar, 1);
739 if (ch && test_bit(FLG_ACTIVE, &ch->bch.Flags)) { 739 if (ch && test_bit(FLG_ACTIVE, &ch->bch.Flags)) {
740 if (ch->bch.tx_skb && (ch->bch.tx_skb->len > 740 if (ch->bch.tx_skb && (ch->bch.tx_skb->len >
741 ch->bch.tx_idx)) 741 ch->bch.tx_idx))
742 isar_fill_fifo(ch); 742 isar_fill_fifo(ch);
743 else 743 else
744 send_next(ch); 744 send_next(ch);
@@ -748,7 +748,7 @@ check_send(struct isar_hw *isar, u8 rdm)
748 ch = sel_bch_isar(isar, 2); 748 ch = sel_bch_isar(isar, 2);
749 if (ch && test_bit(FLG_ACTIVE, &ch->bch.Flags)) { 749 if (ch && test_bit(FLG_ACTIVE, &ch->bch.Flags)) {
750 if (ch->bch.tx_skb && (ch->bch.tx_skb->len > 750 if (ch->bch.tx_skb && (ch->bch.tx_skb->len >
751 ch->bch.tx_idx)) 751 ch->bch.tx_idx))
752 isar_fill_fifo(ch); 752 isar_fill_fifo(ch);
753 else 753 else
754 send_next(ch); 754 send_next(ch);
@@ -757,10 +757,10 @@ check_send(struct isar_hw *isar, u8 rdm)
757} 757}
758 758
759const char *dmril[] = {"NO SPEED", "1200/75", "NODEF2", "75/1200", "NODEF4", 759const char *dmril[] = {"NO SPEED", "1200/75", "NODEF2", "75/1200", "NODEF4",
760 "300", "600", "1200", "2400", "4800", "7200", 760 "300", "600", "1200", "2400", "4800", "7200",
761 "9600nt", "9600t", "12000", "14400", "WRONG"}; 761 "9600nt", "9600t", "12000", "14400", "WRONG"};
762const char *dmrim[] = {"NO MOD", "NO DEF", "V32/V32b", "V22", "V21", 762const char *dmrim[] = {"NO MOD", "NO DEF", "V32/V32b", "V22", "V21",
763 "Bell103", "V23", "Bell202", "V17", "V29", "V27ter"}; 763 "Bell103", "V23", "Bell202", "V17", "V29", "V27ter"};
764 764
765static void 765static void
766isar_pump_status_rsp(struct isar_ch *ch) { 766isar_pump_status_rsp(struct isar_ch *ch) {
@@ -892,10 +892,10 @@ isar_pump_statev_fax(struct isar_ch *ch, u8 devt) {
892 pr_debug("%s: pump stev LINE_TX_H\n", ch->is->name); 892 pr_debug("%s: pump stev LINE_TX_H\n", ch->is->name);
893 ch->state = STFAX_CONT; 893 ch->state = STFAX_CONT;
894 send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL, 894 send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL,
895 PCTRL_CMD_CONT, 0, NULL); 895 PCTRL_CMD_CONT, 0, NULL);
896 } else { 896 } else {
897 pr_debug("%s: pump stev LINE_TX_H wrong st %x\n", 897 pr_debug("%s: pump stev LINE_TX_H wrong st %x\n",
898 ch->is->name, ch->state); 898 ch->is->name, ch->state);
899 } 899 }
900 break; 900 break;
901 case PSEV_LINE_RX_H: 901 case PSEV_LINE_RX_H:
@@ -903,10 +903,10 @@ isar_pump_statev_fax(struct isar_ch *ch, u8 devt) {
903 pr_debug("%s: pump stev LINE_RX_H\n", ch->is->name); 903 pr_debug("%s: pump stev LINE_RX_H\n", ch->is->name);
904 ch->state = STFAX_CONT; 904 ch->state = STFAX_CONT;
905 send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL, 905 send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL,
906 PCTRL_CMD_CONT, 0, NULL); 906 PCTRL_CMD_CONT, 0, NULL);
907 } else { 907 } else {
908 pr_debug("%s: pump stev LINE_RX_H wrong st %x\n", 908 pr_debug("%s: pump stev LINE_RX_H wrong st %x\n",
909 ch->is->name, ch->state); 909 ch->is->name, ch->state);
910 } 910 }
911 break; 911 break;
912 case PSEV_LINE_TX_B: 912 case PSEV_LINE_TX_B:
@@ -914,10 +914,10 @@ isar_pump_statev_fax(struct isar_ch *ch, u8 devt) {
914 pr_debug("%s: pump stev LINE_TX_B\n", ch->is->name); 914 pr_debug("%s: pump stev LINE_TX_B\n", ch->is->name);
915 ch->state = STFAX_CONT; 915 ch->state = STFAX_CONT;
916 send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL, 916 send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL,
917 PCTRL_CMD_CONT, 0, NULL); 917 PCTRL_CMD_CONT, 0, NULL);
918 } else { 918 } else {
919 pr_debug("%s: pump stev LINE_TX_B wrong st %x\n", 919 pr_debug("%s: pump stev LINE_TX_B wrong st %x\n",
920 ch->is->name, ch->state); 920 ch->is->name, ch->state);
921 } 921 }
922 break; 922 break;
923 case PSEV_LINE_RX_B: 923 case PSEV_LINE_RX_B:
@@ -925,10 +925,10 @@ isar_pump_statev_fax(struct isar_ch *ch, u8 devt) {
925 pr_debug("%s: pump stev LINE_RX_B\n", ch->is->name); 925 pr_debug("%s: pump stev LINE_RX_B\n", ch->is->name);
926 ch->state = STFAX_CONT; 926 ch->state = STFAX_CONT;
927 send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL, 927 send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL,
928 PCTRL_CMD_CONT, 0, NULL); 928 PCTRL_CMD_CONT, 0, NULL);
929 } else { 929 } else {
930 pr_debug("%s: pump stev LINE_RX_B wrong st %x\n", 930 pr_debug("%s: pump stev LINE_RX_B wrong st %x\n",
931 ch->is->name, ch->state); 931 ch->is->name, ch->state);
932 } 932 }
933 break; 933 break;
934 case PSEV_RSP_CONN: 934 case PSEV_RSP_CONN:
@@ -941,19 +941,19 @@ isar_pump_statev_fax(struct isar_ch *ch, u8 devt) {
941 int delay = (ch->mod == 3) ? 1000 : 200; 941 int delay = (ch->mod == 3) ? 1000 : 200;
942 /* 1s (200 ms) Flags before data */ 942 /* 1s (200 ms) Flags before data */
943 if (test_and_set_bit(FLG_FTI_RUN, 943 if (test_and_set_bit(FLG_FTI_RUN,
944 &ch->bch.Flags)) 944 &ch->bch.Flags))
945 del_timer(&ch->ftimer); 945 del_timer(&ch->ftimer);
946 ch->ftimer.expires = 946 ch->ftimer.expires =
947 jiffies + ((delay * HZ)/1000); 947 jiffies + ((delay * HZ) / 1000);
948 test_and_set_bit(FLG_LL_CONN, 948 test_and_set_bit(FLG_LL_CONN,
949 &ch->bch.Flags); 949 &ch->bch.Flags);
950 add_timer(&ch->ftimer); 950 add_timer(&ch->ftimer);
951 } else { 951 } else {
952 deliver_status(ch, HW_MOD_CONNECT); 952 deliver_status(ch, HW_MOD_CONNECT);
953 } 953 }
954 } else { 954 } else {
955 pr_debug("%s: pump stev RSP_CONN wrong st %x\n", 955 pr_debug("%s: pump stev RSP_CONN wrong st %x\n",
956 ch->is->name, ch->state); 956 ch->is->name, ch->state);
957 } 957 }
958 break; 958 break;
959 case PSEV_FLAGS_DET: 959 case PSEV_FLAGS_DET:
@@ -961,7 +961,7 @@ isar_pump_statev_fax(struct isar_ch *ch, u8 devt) {
961 break; 961 break;
962 case PSEV_RSP_DISC: 962 case PSEV_RSP_DISC:
963 pr_debug("%s: pump stev RSP_DISC state(%d)\n", 963 pr_debug("%s: pump stev RSP_DISC state(%d)\n",
964 ch->is->name, ch->state); 964 ch->is->name, ch->state);
965 if (ch->state == STFAX_ESCAPE) { 965 if (ch->state == STFAX_ESCAPE) {
966 p1 = 5; 966 p1 = 5;
967 switch (ch->newcmd) { 967 switch (ch->newcmd) {
@@ -972,7 +972,7 @@ isar_pump_statev_fax(struct isar_ch *ch, u8 devt) {
972 p1 = 2; 972 p1 = 2;
973 case PCTRL_CMD_FTH: 973 case PCTRL_CMD_FTH:
974 send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL, 974 send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL,
975 PCTRL_CMD_SILON, 1, &p1); 975 PCTRL_CMD_SILON, 1, &p1);
976 ch->state = STFAX_SILDET; 976 ch->state = STFAX_SILDET;
977 break; 977 break;
978 case PCTRL_CMD_FRH: 978 case PCTRL_CMD_FRH:
@@ -983,13 +983,13 @@ isar_pump_statev_fax(struct isar_ch *ch, u8 devt) {
983 ch->cmd = ch->newcmd; 983 ch->cmd = ch->newcmd;
984 ch->newcmd = 0; 984 ch->newcmd = 0;
985 send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL, 985 send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL,
986 ch->cmd, 1, &p1); 986 ch->cmd, 1, &p1);
987 ch->state = STFAX_LINE; 987 ch->state = STFAX_LINE;
988 ch->try_mod = 3; 988 ch->try_mod = 3;
989 break; 989 break;
990 default: 990 default:
991 pr_debug("%s: RSP_DISC unknown newcmd %x\n", 991 pr_debug("%s: RSP_DISC unknown newcmd %x\n",
992 ch->is->name, ch->newcmd); 992 ch->is->name, ch->newcmd);
993 break; 993 break;
994 } 994 }
995 } else if (ch->state == STFAX_ACTIV) { 995 } else if (ch->state == STFAX_ACTIV) {
@@ -1015,7 +1015,7 @@ isar_pump_statev_fax(struct isar_ch *ch, u8 devt) {
1015 ch->cmd = ch->newcmd; 1015 ch->cmd = ch->newcmd;
1016 ch->newcmd = 0; 1016 ch->newcmd = 0;
1017 send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL, 1017 send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL,
1018 ch->cmd, 1, &p1); 1018 ch->cmd, 1, &p1);
1019 ch->state = STFAX_LINE; 1019 ch->state = STFAX_LINE;
1020 ch->try_mod = 3; 1020 ch->try_mod = 3;
1021 } 1021 }
@@ -1026,17 +1026,17 @@ isar_pump_statev_fax(struct isar_ch *ch, u8 devt) {
1026 case PSEV_RSP_FCERR: 1026 case PSEV_RSP_FCERR:
1027 if (ch->state == STFAX_LINE) { 1027 if (ch->state == STFAX_LINE) {
1028 pr_debug("%s: pump stev RSP_FCERR try %d\n", 1028 pr_debug("%s: pump stev RSP_FCERR try %d\n",
1029 ch->is->name, ch->try_mod); 1029 ch->is->name, ch->try_mod);
1030 if (ch->try_mod--) { 1030 if (ch->try_mod--) {
1031 send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL, 1031 send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL,
1032 ch->cmd, 1, &ch->mod); 1032 ch->cmd, 1, &ch->mod);
1033 break; 1033 break;
1034 } 1034 }
1035 } 1035 }
1036 pr_debug("%s: pump stev RSP_FCERR\n", ch->is->name); 1036 pr_debug("%s: pump stev RSP_FCERR\n", ch->is->name);
1037 ch->state = STFAX_ESCAPE; 1037 ch->state = STFAX_ESCAPE;
1038 send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL, PCTRL_CMD_ESC, 1038 send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL, PCTRL_CMD_ESC,
1039 0, NULL); 1039 0, NULL);
1040 deliver_status(ch, HW_MOD_FCERROR); 1040 deliver_status(ch, HW_MOD_FCERROR);
1041 break; 1041 break;
1042 default: 1042 default:
@@ -1057,8 +1057,8 @@ mISDNisar_irq(struct isar_hw *isar)
1057 isar_rcv_frame(ch); 1057 isar_rcv_frame(ch);
1058 else { 1058 else {
1059 pr_debug("%s: ISAR spurious IIS_RDATA %x/%x/%x\n", 1059 pr_debug("%s: ISAR spurious IIS_RDATA %x/%x/%x\n",
1060 isar->name, isar->iis, isar->cmsb, 1060 isar->name, isar->iis, isar->cmsb,
1061 isar->clsb); 1061 isar->clsb);
1062 isar->write_reg(isar->hw, ISAR_IIA, 0); 1062 isar->write_reg(isar->hw, ISAR_IIA, 0);
1063 } 1063 }
1064 break; 1064 break;
@@ -1078,7 +1078,7 @@ mISDNisar_irq(struct isar_hw *isar)
1078 } 1078 }
1079#endif 1079#endif
1080 pr_debug("%s: Buffer STEV dpath%d msb(%x)\n", 1080 pr_debug("%s: Buffer STEV dpath%d msb(%x)\n",
1081 isar->name, isar->iis>>6, isar->cmsb); 1081 isar->name, isar->iis >> 6, isar->cmsb);
1082 isar->write_reg(isar->hw, ISAR_IIA, 0); 1082 isar->write_reg(isar->hw, ISAR_IIA, 0);
1083 break; 1083 break;
1084 case ISAR_IIS_PSTEV: 1084 case ISAR_IIS_PSTEV:
@@ -1100,16 +1100,16 @@ mISDNisar_irq(struct isar_hw *isar)
1100 tt += 7; 1100 tt += 7;
1101 tt |= DTMF_TONE_VAL; 1101 tt |= DTMF_TONE_VAL;
1102 _queue_data(&ch->bch.ch, PH_CONTROL_IND, 1102 _queue_data(&ch->bch.ch, PH_CONTROL_IND,
1103 MISDN_ID_ANY, sizeof(tt), &tt, 1103 MISDN_ID_ANY, sizeof(tt), &tt,
1104 GFP_ATOMIC); 1104 GFP_ATOMIC);
1105 } else 1105 } else
1106 pr_debug("%s: ISAR IIS_PSTEV pm %d sta %x\n", 1106 pr_debug("%s: ISAR IIS_PSTEV pm %d sta %x\n",
1107 isar->name, ch->bch.state, 1107 isar->name, ch->bch.state,
1108 isar->cmsb); 1108 isar->cmsb);
1109 } else { 1109 } else {
1110 pr_debug("%s: ISAR spurious IIS_PSTEV %x/%x/%x\n", 1110 pr_debug("%s: ISAR spurious IIS_PSTEV %x/%x/%x\n",
1111 isar->name, isar->iis, isar->cmsb, 1111 isar->name, isar->iis, isar->cmsb,
1112 isar->clsb); 1112 isar->clsb);
1113 isar->write_reg(isar->hw, ISAR_IIA, 0); 1113 isar->write_reg(isar->hw, ISAR_IIA, 0);
1114 } 1114 }
1115 break; 1115 break;
@@ -1120,8 +1120,8 @@ mISDNisar_irq(struct isar_hw *isar)
1120 isar_pump_status_rsp(ch); 1120 isar_pump_status_rsp(ch);
1121 } else { 1121 } else {
1122 pr_debug("%s: ISAR spurious IIS_PSTRSP %x/%x/%x\n", 1122 pr_debug("%s: ISAR spurious IIS_PSTRSP %x/%x/%x\n",
1123 isar->name, isar->iis, isar->cmsb, 1123 isar->name, isar->iis, isar->cmsb,
1124 isar->clsb); 1124 isar->clsb);
1125 isar->write_reg(isar->hw, ISAR_IIA, 0); 1125 isar->write_reg(isar->hw, ISAR_IIA, 0);
1126 } 1126 }
1127 break; 1127 break;
@@ -1137,7 +1137,7 @@ mISDNisar_irq(struct isar_hw *isar)
1137 default: 1137 default:
1138 rcv_mbox(isar, NULL); 1138 rcv_mbox(isar, NULL);
1139 pr_debug("%s: unhandled msg iis(%x) ctrl(%x/%x)\n", 1139 pr_debug("%s: unhandled msg iis(%x) ctrl(%x/%x)\n",
1140 isar->name, isar->iis, isar->cmsb, isar->clsb); 1140 isar->name, isar->iis, isar->cmsb, isar->clsb);
1141 break; 1141 break;
1142 } 1142 }
1143} 1143}
@@ -1169,11 +1169,11 @@ setup_pump(struct isar_ch *ch) {
1169 if (test_bit(FLG_DTMFSEND, &ch->bch.Flags)) { 1169 if (test_bit(FLG_DTMFSEND, &ch->bch.Flags)) {
1170 param[0] = 5; /* TOA 5 db */ 1170 param[0] = 5; /* TOA 5 db */
1171 send_mbox(ch->is, dps | ISAR_HIS_PUMPCFG, 1171 send_mbox(ch->is, dps | ISAR_HIS_PUMPCFG,
1172 PMOD_DTMF_TRANS, 1, param); 1172 PMOD_DTMF_TRANS, 1, param);
1173 } else { 1173 } else {
1174 param[0] = 40; /* REL -46 dbm */ 1174 param[0] = 40; /* REL -46 dbm */
1175 send_mbox(ch->is, dps | ISAR_HIS_PUMPCFG, 1175 send_mbox(ch->is, dps | ISAR_HIS_PUMPCFG,
1176 PMOD_DTMF, 1, param); 1176 PMOD_DTMF, 1, param);
1177 } 1177 }
1178 case ISDN_P_B_MODEM_ASYNC: 1178 case ISDN_P_B_MODEM_ASYNC:
1179 ctrl = PMOD_DATAMODEM; 1179 ctrl = PMOD_DATAMODEM;
@@ -1220,17 +1220,17 @@ setup_sart(struct isar_ch *ch) {
1220 switch (ch->bch.state) { 1220 switch (ch->bch.state) {
1221 case ISDN_P_NONE: 1221 case ISDN_P_NONE:
1222 send_mbox(ch->is, dps | ISAR_HIS_SARTCFG, SMODE_DISABLE, 1222 send_mbox(ch->is, dps | ISAR_HIS_SARTCFG, SMODE_DISABLE,
1223 0, NULL); 1223 0, NULL);
1224 break; 1224 break;
1225 case ISDN_P_B_RAW: 1225 case ISDN_P_B_RAW:
1226 case ISDN_P_B_L2DTMF: 1226 case ISDN_P_B_L2DTMF:
1227 send_mbox(ch->is, dps | ISAR_HIS_SARTCFG, SMODE_BINARY, 1227 send_mbox(ch->is, dps | ISAR_HIS_SARTCFG, SMODE_BINARY,
1228 2, param); 1228 2, param);
1229 break; 1229 break;
1230 case ISDN_P_B_HDLC: 1230 case ISDN_P_B_HDLC:
1231 case ISDN_P_B_T30_FAX: 1231 case ISDN_P_B_T30_FAX:
1232 send_mbox(ch->is, dps | ISAR_HIS_SARTCFG, SMODE_HDLC, 1232 send_mbox(ch->is, dps | ISAR_HIS_SARTCFG, SMODE_HDLC,
1233 1, param); 1233 1, param);
1234 break; 1234 break;
1235 case ISDN_P_B_MODEM_ASYNC: 1235 case ISDN_P_B_MODEM_ASYNC:
1236 ctrl = SMODE_V14 | SCTRL_HDMC_BOTH; 1236 ctrl = SMODE_V14 | SCTRL_HDMC_BOTH;
@@ -1297,7 +1297,7 @@ modeisar(struct isar_ch *ch, u32 bprotocol)
1297 if (!test_and_set_bit(ISAR_DP2_USE, &ch->is->Flags)) 1297 if (!test_and_set_bit(ISAR_DP2_USE, &ch->is->Flags))
1298 ch->dpath = 2; 1298 ch->dpath = 2;
1299 else if (!test_and_set_bit(ISAR_DP1_USE, 1299 else if (!test_and_set_bit(ISAR_DP1_USE,
1300 &ch->is->Flags)) 1300 &ch->is->Flags))
1301 ch->dpath = 1; 1301 ch->dpath = 1;
1302 else { 1302 else {
1303 pr_info("modeisar both pathes in use\n"); 1303 pr_info("modeisar both pathes in use\n");
@@ -1307,7 +1307,7 @@ modeisar(struct isar_ch *ch, u32 bprotocol)
1307 test_and_set_bit(FLG_HDLC, &ch->bch.Flags); 1307 test_and_set_bit(FLG_HDLC, &ch->bch.Flags);
1308 else 1308 else
1309 test_and_set_bit(FLG_TRANSPARENT, 1309 test_and_set_bit(FLG_TRANSPARENT,
1310 &ch->bch.Flags); 1310 &ch->bch.Flags);
1311 break; 1311 break;
1312 case ISDN_P_B_MODEM_ASYNC: 1312 case ISDN_P_B_MODEM_ASYNC:
1313 case ISDN_P_B_T30_FAX: 1313 case ISDN_P_B_T30_FAX:
@@ -1328,7 +1328,7 @@ modeisar(struct isar_ch *ch, u32 bprotocol)
1328 } 1328 }
1329 } 1329 }
1330 pr_debug("%s: ISAR ch%d dp%d protocol %x->%x\n", ch->is->name, 1330 pr_debug("%s: ISAR ch%d dp%d protocol %x->%x\n", ch->is->name,
1331 ch->bch.nr, ch->dpath, ch->bch.state, bprotocol); 1331 ch->bch.nr, ch->dpath, ch->bch.state, bprotocol);
1332 ch->bch.state = bprotocol; 1332 ch->bch.state = bprotocol;
1333 setup_pump(ch); 1333 setup_pump(ch);
1334 setup_iom2(ch); 1334 setup_iom2(ch);
@@ -1353,7 +1353,7 @@ isar_pump_cmd(struct isar_ch *ch, u32 cmd, u8 para)
1353 u8 ctrl = 0, nom = 0, p1 = 0; 1353 u8 ctrl = 0, nom = 0, p1 = 0;
1354 1354
1355 pr_debug("%s: isar_pump_cmd %x/%x state(%x)\n", 1355 pr_debug("%s: isar_pump_cmd %x/%x state(%x)\n",
1356 ch->is->name, cmd, para, ch->bch.state); 1356 ch->is->name, cmd, para, ch->bch.state);
1357 switch (cmd) { 1357 switch (cmd) {
1358 case HW_MOD_FTM: 1358 case HW_MOD_FTM:
1359 if (ch->state == STFAX_READY) { 1359 if (ch->state == STFAX_READY) {
@@ -1367,7 +1367,7 @@ isar_pump_cmd(struct isar_ch *ch, u32 cmd, u8 para)
1367 ch->newcmd = 0; 1367 ch->newcmd = 0;
1368 ch->try_mod = 3; 1368 ch->try_mod = 3;
1369 } else if ((ch->state == STFAX_ACTIV) && 1369 } else if ((ch->state == STFAX_ACTIV) &&
1370 (ch->cmd == PCTRL_CMD_FTM) && (ch->mod == para)) 1370 (ch->cmd == PCTRL_CMD_FTM) && (ch->mod == para))
1371 deliver_status(ch, HW_MOD_CONNECT); 1371 deliver_status(ch, HW_MOD_CONNECT);
1372 else { 1372 else {
1373 ch->newmod = para; 1373 ch->newmod = para;
@@ -1389,8 +1389,8 @@ isar_pump_cmd(struct isar_ch *ch, u32 cmd, u8 para)
1389 ch->newcmd = 0; 1389 ch->newcmd = 0;
1390 ch->try_mod = 3; 1390 ch->try_mod = 3;
1391 } else if ((ch->state == STFAX_ACTIV) && 1391 } else if ((ch->state == STFAX_ACTIV) &&
1392 (ch->cmd == PCTRL_CMD_FTH) && (ch->mod == para)) 1392 (ch->cmd == PCTRL_CMD_FTH) && (ch->mod == para))
1393 deliver_status(ch, HW_MOD_CONNECT); 1393 deliver_status(ch, HW_MOD_CONNECT);
1394 else { 1394 else {
1395 ch->newmod = para; 1395 ch->newmod = para;
1396 ch->newcmd = PCTRL_CMD_FTH; 1396 ch->newcmd = PCTRL_CMD_FTH;
@@ -1411,7 +1411,7 @@ isar_pump_cmd(struct isar_ch *ch, u32 cmd, u8 para)
1411 ch->newcmd = 0; 1411 ch->newcmd = 0;
1412 ch->try_mod = 3; 1412 ch->try_mod = 3;
1413 } else if ((ch->state == STFAX_ACTIV) && 1413 } else if ((ch->state == STFAX_ACTIV) &&
1414 (ch->cmd == PCTRL_CMD_FRM) && (ch->mod == para)) 1414 (ch->cmd == PCTRL_CMD_FRM) && (ch->mod == para))
1415 deliver_status(ch, HW_MOD_CONNECT); 1415 deliver_status(ch, HW_MOD_CONNECT);
1416 else { 1416 else {
1417 ch->newmod = para; 1417 ch->newmod = para;
@@ -1433,7 +1433,7 @@ isar_pump_cmd(struct isar_ch *ch, u32 cmd, u8 para)
1433 ch->newcmd = 0; 1433 ch->newcmd = 0;
1434 ch->try_mod = 3; 1434 ch->try_mod = 3;
1435 } else if ((ch->state == STFAX_ACTIV) && 1435 } else if ((ch->state == STFAX_ACTIV) &&
1436 (ch->cmd == PCTRL_CMD_FRH) && (ch->mod == para)) 1436 (ch->cmd == PCTRL_CMD_FRH) && (ch->mod == para))
1437 deliver_status(ch, HW_MOD_CONNECT); 1437 deliver_status(ch, HW_MOD_CONNECT);
1438 else { 1438 else {
1439 ch->newmod = para; 1439 ch->newmod = para;
@@ -1464,7 +1464,7 @@ isar_setup(struct isar_hw *isar)
1464 for (i = 0; i < 2; i++) { 1464 for (i = 0; i < 2; i++) {
1465 /* Buffer Config */ 1465 /* Buffer Config */
1466 send_mbox(isar, (i ? ISAR_HIS_DPS2 : ISAR_HIS_DPS1) | 1466 send_mbox(isar, (i ? ISAR_HIS_DPS2 : ISAR_HIS_DPS1) |
1467 ISAR_HIS_P12CFG, 4, 1, &msg); 1467 ISAR_HIS_P12CFG, 4, 1, &msg);
1468 isar->ch[i].mml = msg; 1468 isar->ch[i].mml = msg;
1469 isar->ch[i].bch.state = 0; 1469 isar->ch[i].bch.state = 0;
1470 isar->ch[i].dpath = i + 1; 1470 isar->ch[i].dpath = i + 1;
@@ -1505,7 +1505,7 @@ isar_l2l1(struct mISDNchannel *ch, struct sk_buff *skb)
1505 spin_unlock_irqrestore(ich->is->hwlock, flags); 1505 spin_unlock_irqrestore(ich->is->hwlock, flags);
1506 if (!ret) 1506 if (!ret)
1507 _queue_data(ch, PH_ACTIVATE_IND, MISDN_ID_ANY, 0, 1507 _queue_data(ch, PH_ACTIVATE_IND, MISDN_ID_ANY, 0,
1508 NULL, GFP_KERNEL); 1508 NULL, GFP_KERNEL);
1509 break; 1509 break;
1510 case PH_DEACTIVATE_REQ: 1510 case PH_DEACTIVATE_REQ:
1511 spin_lock_irqsave(ich->is->hwlock, flags); 1511 spin_lock_irqsave(ich->is->hwlock, flags);
@@ -1513,15 +1513,15 @@ isar_l2l1(struct mISDNchannel *ch, struct sk_buff *skb)
1513 modeisar(ich, ISDN_P_NONE); 1513 modeisar(ich, ISDN_P_NONE);
1514 spin_unlock_irqrestore(ich->is->hwlock, flags); 1514 spin_unlock_irqrestore(ich->is->hwlock, flags);
1515 _queue_data(ch, PH_DEACTIVATE_IND, MISDN_ID_ANY, 0, 1515 _queue_data(ch, PH_DEACTIVATE_IND, MISDN_ID_ANY, 0,
1516 NULL, GFP_KERNEL); 1516 NULL, GFP_KERNEL);
1517 ret = 0; 1517 ret = 0;
1518 break; 1518 break;
1519 case PH_CONTROL_REQ: 1519 case PH_CONTROL_REQ:
1520 val = (u32 *)skb->data; 1520 val = (u32 *)skb->data;
1521 pr_debug("%s: PH_CONTROL | REQUEST %x/%x\n", ich->is->name, 1521 pr_debug("%s: PH_CONTROL | REQUEST %x/%x\n", ich->is->name,
1522 hh->id, *val); 1522 hh->id, *val);
1523 if ((hh->id == 0) && ((*val & ~DTMF_TONE_MASK) == 1523 if ((hh->id == 0) && ((*val & ~DTMF_TONE_MASK) ==
1524 DTMF_TONE_VAL)) { 1524 DTMF_TONE_VAL)) {
1525 if (bch->state == ISDN_P_B_L2DTMF) { 1525 if (bch->state == ISDN_P_B_L2DTMF) {
1526 char tt = *val & DTMF_TONE_MASK; 1526 char tt = *val & DTMF_TONE_MASK;
1527 1527
@@ -1541,7 +1541,7 @@ isar_l2l1(struct mISDNchannel *ch, struct sk_buff *skb)
1541 return -EINVAL; 1541 return -EINVAL;
1542 } 1542 }
1543 } else if ((hh->id == HW_MOD_FRM) || (hh->id == HW_MOD_FRH) || 1543 } else if ((hh->id == HW_MOD_FRM) || (hh->id == HW_MOD_FRH) ||
1544 (hh->id == HW_MOD_FTM) || (hh->id == HW_MOD_FTH)) { 1544 (hh->id == HW_MOD_FTM) || (hh->id == HW_MOD_FTH)) {
1545 for (id = 0; id < FAXMODCNT; id++) 1545 for (id = 0; id < FAXMODCNT; id++)
1546 if (faxmodulation[id] == *val) 1546 if (faxmodulation[id] == *val)
1547 break; 1547 break;
@@ -1581,7 +1581,7 @@ channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq)
1581 case MISDN_CTRL_GETOP: 1581 case MISDN_CTRL_GETOP:
1582 cq->op = 0; 1582 cq->op = 0;
1583 break; 1583 break;
1584 /* Nothing implemented yet */ 1584 /* Nothing implemented yet */
1585 case MISDN_CTRL_FILL_EMPTY: 1585 case MISDN_CTRL_FILL_EMPTY:
1586 default: 1586 default:
1587 pr_info("%s: unknown Op %x\n", __func__, cq->op); 1587 pr_info("%s: unknown Op %x\n", __func__, cq->op);
@@ -1647,7 +1647,7 @@ init_isar(struct isar_hw *isar)
1647 isar->version = ISARVersion(isar); 1647 isar->version = ISARVersion(isar);
1648 if (isar->ch[0].bch.debug & DEBUG_HW) 1648 if (isar->ch[0].bch.debug & DEBUG_HW)
1649 pr_notice("%s: Testing version %d (%d time)\n", 1649 pr_notice("%s: Testing version %d (%d time)\n",
1650 isar->name, isar->version, 3 - cnt); 1650 isar->name, isar->version, 3 - cnt);
1651 if (isar->version == 1) 1651 if (isar->version == 1)
1652 break; 1652 break;
1653 isar->ctrl(isar->hw, HW_RESET_REQ, 0); 1653 isar->ctrl(isar->hw, HW_RESET_REQ, 0);