bch 130 drivers/isdn/hardware/mISDN/avmfritz.c struct bchannel bch[2]; bch 141 drivers/isdn/hardware/mISDN/avmfritz.c card->bch[0].debug = debug; bch 142 drivers/isdn/hardware/mISDN/avmfritz.c card->bch[1].debug = debug; bch 250 drivers/isdn/hardware/mISDN/avmfritz.c if (test_bit(FLG_ACTIVE, &fc->bch[0].Flags) && bch 251 drivers/isdn/hardware/mISDN/avmfritz.c (fc->bch[0].nr & channel)) bch 252 drivers/isdn/hardware/mISDN/avmfritz.c return &fc->bch[0]; bch 253 drivers/isdn/hardware/mISDN/avmfritz.c else if (test_bit(FLG_ACTIVE, &fc->bch[1].Flags) && bch 254 drivers/isdn/hardware/mISDN/avmfritz.c (fc->bch[1].nr & channel)) bch 255 drivers/isdn/hardware/mISDN/avmfritz.c return &fc->bch[1]; bch 275 drivers/isdn/hardware/mISDN/avmfritz.c write_ctrl(struct bchannel *bch, int which) { bch 276 drivers/isdn/hardware/mISDN/avmfritz.c struct fritzcard *fc = bch->hw; bch 279 drivers/isdn/hardware/mISDN/avmfritz.c hdlc = &fc->hdlc[(bch->nr - 1) & 1]; bch 280 drivers/isdn/hardware/mISDN/avmfritz.c pr_debug("%s: hdlc %c wr%x ctrl %x\n", fc->name, '@' + bch->nr, bch 284 drivers/isdn/hardware/mISDN/avmfritz.c __write_ctrl_pciv2(fc, hdlc, bch->nr); bch 287 drivers/isdn/hardware/mISDN/avmfritz.c __write_ctrl_pci(fc, hdlc, bch->nr); bch 336 drivers/isdn/hardware/mISDN/avmfritz.c modehdlc(struct bchannel *bch, int protocol) bch 338 drivers/isdn/hardware/mISDN/avmfritz.c struct fritzcard *fc = bch->hw; bch 342 drivers/isdn/hardware/mISDN/avmfritz.c hdlc = &fc->hdlc[(bch->nr - 1) & 1]; bch 344 drivers/isdn/hardware/mISDN/avmfritz.c '@' + bch->nr, bch->state, protocol, bch->nr); bch 350 drivers/isdn/hardware/mISDN/avmfritz.c bch->state = -1; bch 353 drivers/isdn/hardware/mISDN/avmfritz.c if (bch->state == ISDN_P_NONE) bch 357 drivers/isdn/hardware/mISDN/avmfritz.c write_ctrl(bch, 5); bch 358 drivers/isdn/hardware/mISDN/avmfritz.c bch->state = ISDN_P_NONE; bch 359 drivers/isdn/hardware/mISDN/avmfritz.c test_and_clear_bit(FLG_HDLC, &bch->Flags); bch 360 drivers/isdn/hardware/mISDN/avmfritz.c test_and_clear_bit(FLG_TRANSPARENT, &bch->Flags); bch 363 drivers/isdn/hardware/mISDN/avmfritz.c bch->state = protocol; bch 366 drivers/isdn/hardware/mISDN/avmfritz.c write_ctrl(bch, 5); bch 368 drivers/isdn/hardware/mISDN/avmfritz.c write_ctrl(bch, 1); bch 370 drivers/isdn/hardware/mISDN/avmfritz.c test_and_set_bit(FLG_TRANSPARENT, &bch->Flags); bch 373 drivers/isdn/hardware/mISDN/avmfritz.c bch->state = protocol; bch 376 drivers/isdn/hardware/mISDN/avmfritz.c write_ctrl(bch, 5); bch 378 drivers/isdn/hardware/mISDN/avmfritz.c write_ctrl(bch, 1); bch 380 drivers/isdn/hardware/mISDN/avmfritz.c test_and_set_bit(FLG_HDLC, &bch->Flags); bch 390 drivers/isdn/hardware/mISDN/avmfritz.c hdlc_empty_fifo(struct bchannel *bch, int count) bch 396 drivers/isdn/hardware/mISDN/avmfritz.c struct fritzcard *fc = bch->hw; bch 399 drivers/isdn/hardware/mISDN/avmfritz.c if (test_bit(FLG_RX_OFF, &bch->Flags)) { bch 401 drivers/isdn/hardware/mISDN/avmfritz.c bch->dropcnt += count; bch 403 drivers/isdn/hardware/mISDN/avmfritz.c cnt = bchannel_get_rxbuf(bch, count); bch 406 drivers/isdn/hardware/mISDN/avmfritz.c fc->name, bch->nr, count); bch 409 drivers/isdn/hardware/mISDN/avmfritz.c p = skb_put(bch->rx_skb, count); bch 413 drivers/isdn/hardware/mISDN/avmfritz.c addr = fc->addr + (bch->nr == 2 ? bch 417 drivers/isdn/hardware/mISDN/avmfritz.c outl(bch->nr == 2 ? AVM_HDLC_2 : AVM_HDLC_1, fc->addr); bch 430 drivers/isdn/hardware/mISDN/avmfritz.c bch->nr, fc->name, count); bch 436 drivers/isdn/hardware/mISDN/avmfritz.c hdlc_fill_fifo(struct bchannel *bch) bch 438 drivers/isdn/hardware/mISDN/avmfritz.c struct fritzcard *fc = bch->hw; bch 445 drivers/isdn/hardware/mISDN/avmfritz.c idx = (bch->nr - 1) & 1; bch 449 drivers/isdn/hardware/mISDN/avmfritz.c if (!bch->tx_skb) { bch 450 drivers/isdn/hardware/mISDN/avmfritz.c if (!test_bit(FLG_TX_EMPTY, &bch->Flags)) bch 453 drivers/isdn/hardware/mISDN/avmfritz.c p = bch->fill; bch 456 drivers/isdn/hardware/mISDN/avmfritz.c count = bch->tx_skb->len - bch->tx_idx; bch 459 drivers/isdn/hardware/mISDN/avmfritz.c p = bch->tx_skb->data + bch->tx_idx; bch 465 drivers/isdn/hardware/mISDN/avmfritz.c if (test_bit(FLG_HDLC, &bch->Flags)) bch 470 drivers/isdn/hardware/mISDN/avmfritz.c pr_debug("%s.B%d: %d/%d/%d", fc->name, bch->nr, count, bch 471 drivers/isdn/hardware/mISDN/avmfritz.c bch->tx_idx, bch->tx_skb->len); bch 472 drivers/isdn/hardware/mISDN/avmfritz.c bch->tx_idx += count; bch 474 drivers/isdn/hardware/mISDN/avmfritz.c pr_debug("%s.B%d: fillempty %d\n", fc->name, bch->nr, count); bch 478 drivers/isdn/hardware/mISDN/avmfritz.c __write_ctrl_pciv2(fc, hdlc, bch->nr); bch 479 drivers/isdn/hardware/mISDN/avmfritz.c addr = fc->addr + (bch->nr == 2 ? bch 482 drivers/isdn/hardware/mISDN/avmfritz.c __write_ctrl_pci(fc, hdlc, bch->nr); bch 501 drivers/isdn/hardware/mISDN/avmfritz.c bch->nr, fc->name, count); bch 507 drivers/isdn/hardware/mISDN/avmfritz.c HDLC_irq_xpr(struct bchannel *bch) bch 509 drivers/isdn/hardware/mISDN/avmfritz.c if (bch->tx_skb && bch->tx_idx < bch->tx_skb->len) { bch 510 drivers/isdn/hardware/mISDN/avmfritz.c hdlc_fill_fifo(bch); bch 512 drivers/isdn/hardware/mISDN/avmfritz.c dev_kfree_skb(bch->tx_skb); bch 513 drivers/isdn/hardware/mISDN/avmfritz.c if (get_next_bframe(bch)) { bch 514 drivers/isdn/hardware/mISDN/avmfritz.c hdlc_fill_fifo(bch); bch 515 drivers/isdn/hardware/mISDN/avmfritz.c test_and_clear_bit(FLG_TX_EMPTY, &bch->Flags); bch 516 drivers/isdn/hardware/mISDN/avmfritz.c } else if (test_bit(FLG_TX_EMPTY, &bch->Flags)) { bch 517 drivers/isdn/hardware/mISDN/avmfritz.c hdlc_fill_fifo(bch); bch 523 drivers/isdn/hardware/mISDN/avmfritz.c HDLC_irq(struct bchannel *bch, u32 stat) bch 525 drivers/isdn/hardware/mISDN/avmfritz.c struct fritzcard *fc = bch->hw; bch 530 drivers/isdn/hardware/mISDN/avmfritz.c hdlc = &fc->hdlc[(bch->nr - 1) & 1]; bch 531 drivers/isdn/hardware/mISDN/avmfritz.c pr_debug("%s: ch%d stat %#x\n", fc->name, bch->nr, stat); bch 542 drivers/isdn/hardware/mISDN/avmfritz.c fc->name, bch->nr, stat); bch 545 drivers/isdn/hardware/mISDN/avmfritz.c write_ctrl(bch, 1); bch 547 drivers/isdn/hardware/mISDN/avmfritz.c write_ctrl(bch, 1); bch 548 drivers/isdn/hardware/mISDN/avmfritz.c if (bch->rx_skb) bch 549 drivers/isdn/hardware/mISDN/avmfritz.c skb_trim(bch->rx_skb, 0); bch 554 drivers/isdn/hardware/mISDN/avmfritz.c hdlc_empty_fifo(bch, len); bch 555 drivers/isdn/hardware/mISDN/avmfritz.c if (!bch->rx_skb) bch 557 drivers/isdn/hardware/mISDN/avmfritz.c if (test_bit(FLG_TRANSPARENT, &bch->Flags)) { bch 558 drivers/isdn/hardware/mISDN/avmfritz.c recv_Bchannel(bch, 0, false); bch 562 drivers/isdn/hardware/mISDN/avmfritz.c recv_Bchannel(bch, 0, false); bch 566 drivers/isdn/hardware/mISDN/avmfritz.c skb_trim(bch->rx_skb, 0); bch 577 drivers/isdn/hardware/mISDN/avmfritz.c pr_warning("%s: ch%d stat %x XDU %s\n", fc->name, bch->nr, bch 578 drivers/isdn/hardware/mISDN/avmfritz.c stat, bch->tx_skb ? "tx_skb" : "no tx_skb"); bch 579 drivers/isdn/hardware/mISDN/avmfritz.c if (bch->tx_skb && bch->tx_skb->len) { bch 580 drivers/isdn/hardware/mISDN/avmfritz.c if (!test_bit(FLG_TRANSPARENT, &bch->Flags)) bch 581 drivers/isdn/hardware/mISDN/avmfritz.c bch->tx_idx = 0; bch 582 drivers/isdn/hardware/mISDN/avmfritz.c } else if (test_bit(FLG_FILLEMPTY, &bch->Flags)) { bch 583 drivers/isdn/hardware/mISDN/avmfritz.c test_and_set_bit(FLG_TX_EMPTY, &bch->Flags); bch 587 drivers/isdn/hardware/mISDN/avmfritz.c write_ctrl(bch, 1); bch 589 drivers/isdn/hardware/mISDN/avmfritz.c HDLC_irq_xpr(bch); bch 592 drivers/isdn/hardware/mISDN/avmfritz.c HDLC_irq_xpr(bch); bch 599 drivers/isdn/hardware/mISDN/avmfritz.c struct bchannel *bch; bch 603 drivers/isdn/hardware/mISDN/avmfritz.c bch = Sel_BCS(fc, 1); bch 604 drivers/isdn/hardware/mISDN/avmfritz.c if (bch) bch 605 drivers/isdn/hardware/mISDN/avmfritz.c HDLC_irq(bch, stat); bch 611 drivers/isdn/hardware/mISDN/avmfritz.c bch = Sel_BCS(fc, 2); bch 612 drivers/isdn/hardware/mISDN/avmfritz.c if (bch) bch 613 drivers/isdn/hardware/mISDN/avmfritz.c HDLC_irq(bch, stat); bch 682 drivers/isdn/hardware/mISDN/avmfritz.c struct bchannel *bch = container_of(ch, struct bchannel, ch); bch 683 drivers/isdn/hardware/mISDN/avmfritz.c struct fritzcard *fc = bch->hw; bch 691 drivers/isdn/hardware/mISDN/avmfritz.c ret = bchannel_senddata(bch, skb); bch 693 drivers/isdn/hardware/mISDN/avmfritz.c hdlc_fill_fifo(bch); bch 700 drivers/isdn/hardware/mISDN/avmfritz.c if (!test_and_set_bit(FLG_ACTIVE, &bch->Flags)) bch 701 drivers/isdn/hardware/mISDN/avmfritz.c ret = modehdlc(bch, ch->protocol); bch 711 drivers/isdn/hardware/mISDN/avmfritz.c mISDN_clear_bchannel(bch); bch 712 drivers/isdn/hardware/mISDN/avmfritz.c modehdlc(bch, ISDN_P_NONE); bch 727 drivers/isdn/hardware/mISDN/avmfritz.c modehdlc(&fc->bch[0], -1); bch 728 drivers/isdn/hardware/mISDN/avmfritz.c modehdlc(&fc->bch[1], -1); bch 830 drivers/isdn/hardware/mISDN/avmfritz.c channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq) bch 832 drivers/isdn/hardware/mISDN/avmfritz.c return mISDN_ctrl_bchannel(bch, cq); bch 838 drivers/isdn/hardware/mISDN/avmfritz.c struct bchannel *bch = container_of(ch, struct bchannel, ch); bch 839 drivers/isdn/hardware/mISDN/avmfritz.c struct fritzcard *fc = bch->hw; bch 846 drivers/isdn/hardware/mISDN/avmfritz.c test_and_clear_bit(FLG_OPEN, &bch->Flags); bch 847 drivers/isdn/hardware/mISDN/avmfritz.c cancel_work_sync(&bch->workq); bch 849 drivers/isdn/hardware/mISDN/avmfritz.c mISDN_clear_bchannel(bch); bch 850 drivers/isdn/hardware/mISDN/avmfritz.c modehdlc(bch, ISDN_P_NONE); bch 858 drivers/isdn/hardware/mISDN/avmfritz.c ret = channel_bctrl(bch, arg); bch 897 drivers/isdn/hardware/mISDN/avmfritz.c struct bchannel *bch; bch 903 drivers/isdn/hardware/mISDN/avmfritz.c bch = &fc->bch[rq->adr.channel - 1]; bch 904 drivers/isdn/hardware/mISDN/avmfritz.c if (test_and_set_bit(FLG_OPEN, &bch->Flags)) bch 906 drivers/isdn/hardware/mISDN/avmfritz.c bch->ch.protocol = rq->protocol; bch 907 drivers/isdn/hardware/mISDN/avmfritz.c rq->ch = &bch->ch; bch 1006 drivers/isdn/hardware/mISDN/avmfritz.c modehdlc(&card->bch[0], ISDN_P_NONE); bch 1007 drivers/isdn/hardware/mISDN/avmfritz.c modehdlc(&card->bch[1], ISDN_P_NONE); bch 1011 drivers/isdn/hardware/mISDN/avmfritz.c mISDN_freebchannel(&card->bch[1]); bch 1012 drivers/isdn/hardware/mISDN/avmfritz.c mISDN_freebchannel(&card->bch[0]); bch 1046 drivers/isdn/hardware/mISDN/avmfritz.c card->bch[i].nr = i + 1; bch 1052 drivers/isdn/hardware/mISDN/avmfritz.c mISDN_initbchannel(&card->bch[i], MAX_DATA_MEM, minsize); bch 1053 drivers/isdn/hardware/mISDN/avmfritz.c card->bch[i].hw = card; bch 1054 drivers/isdn/hardware/mISDN/avmfritz.c card->bch[i].ch.send = avm_l2l1B; bch 1055 drivers/isdn/hardware/mISDN/avmfritz.c card->bch[i].ch.ctrl = avm_bctrl; bch 1056 drivers/isdn/hardware/mISDN/avmfritz.c card->bch[i].ch.nr = i + 1; bch 1057 drivers/isdn/hardware/mISDN/avmfritz.c list_add(&card->bch[i].ch.list, &card->isac.dch.dev.bchannels); bch 1077 drivers/isdn/hardware/mISDN/avmfritz.c mISDN_freebchannel(&card->bch[1]); bch 1078 drivers/isdn/hardware/mISDN/avmfritz.c mISDN_freebchannel(&card->bch[0]); bch 42 drivers/isdn/hardware/mISDN/hfc_multi.h struct bchannel *bch; /* link if channel is a B-channel */ bch 844 drivers/isdn/hardware/mISDN/hfcmulti.c struct bchannel *bch = hc->chan[ch].bch; bch 852 drivers/isdn/hardware/mISDN/hfcmulti.c if (!bch) bch 859 drivers/isdn/hardware/mISDN/hfcmulti.c recv_Bchannel_skb(bch, skb); bch 876 drivers/isdn/hardware/mISDN/hfcmulti.c struct bchannel *bch = hc->chan[ch].bch; bch 885 drivers/isdn/hardware/mISDN/hfcmulti.c if (!bch) bch 892 drivers/isdn/hardware/mISDN/hfcmulti.c recv_Bchannel_skb(bch, skb); bch 1830 drivers/isdn/hardware/mISDN/hfcmulti.c struct bchannel *bch = NULL; bch 1842 drivers/isdn/hardware/mISDN/hfcmulti.c bch = hc->chan[ch].bch; bch 1843 drivers/isdn/hardware/mISDN/hfcmulti.c if (!bch) bch 1847 drivers/isdn/hardware/mISDN/hfcmulti.c if (!test_bit(FLG_TRANSPARENT, &bch->Flags)) bch 1916 drivers/isdn/hardware/mISDN/hfcmulti.c recv_Bchannel_skb(bch, skb); bch 1939 drivers/isdn/hardware/mISDN/hfcmulti.c struct bchannel *bch; bch 1944 drivers/isdn/hardware/mISDN/hfcmulti.c bch = hc->chan[ch].bch; bch 1946 drivers/isdn/hardware/mISDN/hfcmulti.c if ((!dch) && (!bch)) bch 1957 drivers/isdn/hardware/mISDN/hfcmulti.c if (!test_bit(FLG_ACTIVE, &bch->Flags)) bch 1959 drivers/isdn/hardware/mISDN/hfcmulti.c sp = &bch->tx_skb; bch 1960 drivers/isdn/hardware/mISDN/hfcmulti.c idxp = &bch->tx_idx; bch 1985 drivers/isdn/hardware/mISDN/hfcmulti.c if (dch || test_bit(FLG_HDLC, &bch->Flags)) { bch 2035 drivers/isdn/hardware/mISDN/hfcmulti.c if (bch && test_bit(FLG_TRANSPARENT, &bch->Flags)) bch 2044 drivers/isdn/hardware/mISDN/hfcmulti.c if (bch && (!test_bit(FLG_HDLC, &bch->Flags)) && bch 2078 drivers/isdn/hardware/mISDN/hfcmulti.c if (bch && test_bit(FLG_FILLEMPTY, &bch->Flags) bch 2079 drivers/isdn/hardware/mISDN/hfcmulti.c && !test_bit(FLG_HDLC, &bch->Flags) && z2 == z1) { bch 2089 drivers/isdn/hardware/mISDN/hfcmulti.c if (bch && (!test_bit(FLG_HDLC, &bch->Flags)) && (!*txpending) bch 2123 drivers/isdn/hardware/mISDN/hfcmulti.c if (dch || test_bit(FLG_HDLC, &bch->Flags)) bch 2149 drivers/isdn/hardware/mISDN/hfcmulti.c if (dch || test_bit(FLG_HDLC, &bch->Flags)) { bch 2157 drivers/isdn/hardware/mISDN/hfcmulti.c if (bch && get_next_bframe(bch)) { bch 2171 drivers/isdn/hardware/mISDN/hfcmulti.c if (bch && test_bit(FLG_TRANSPARENT, &bch->Flags)) bch 2184 drivers/isdn/hardware/mISDN/hfcmulti.c struct bchannel *bch; bch 2189 drivers/isdn/hardware/mISDN/hfcmulti.c bch = hc->chan[ch].bch; bch 2190 drivers/isdn/hardware/mISDN/hfcmulti.c if (bch) { bch 2191 drivers/isdn/hardware/mISDN/hfcmulti.c if (!test_bit(FLG_ACTIVE, &bch->Flags)) bch 2214 drivers/isdn/hardware/mISDN/hfcmulti.c if (bch) bch 2215 drivers/isdn/hardware/mISDN/hfcmulti.c bch->dropcnt += poll; /* not exact but fair enough */ bch 2219 drivers/isdn/hardware/mISDN/hfcmulti.c if (dch || test_bit(FLG_HDLC, &bch->Flags)) { bch 2239 drivers/isdn/hardware/mISDN/hfcmulti.c if ((dch || test_bit(FLG_HDLC, &bch->Flags)) && f1 != f2) bch 2248 drivers/isdn/hardware/mISDN/hfcmulti.c if (bch) { bch 2249 drivers/isdn/hardware/mISDN/hfcmulti.c maxlen = bchannel_get_rxbuf(bch, Zsize); bch 2252 drivers/isdn/hardware/mISDN/hfcmulti.c hc->id + 1, bch->nr, Zsize); bch 2255 drivers/isdn/hardware/mISDN/hfcmulti.c sp = &bch->rx_skb; bch 2256 drivers/isdn/hardware/mISDN/hfcmulti.c maxlen = bch->maxlen; bch 2274 drivers/isdn/hardware/mISDN/hfcmulti.c if (dch || test_bit(FLG_HDLC, &bch->Flags)) { bch 2343 drivers/isdn/hardware/mISDN/hfcmulti.c recv_Bchannel(bch, MISDN_ID_ANY, false); bch 2358 drivers/isdn/hardware/mISDN/hfcmulti.c recv_Bchannel(bch, hc->chan[ch].Zfill, false); bch 2633 drivers/isdn/hardware/mISDN/hfcmulti.c struct bchannel *bch; bch 2641 drivers/isdn/hardware/mISDN/hfcmulti.c bch = hc->chan[ch].bch; bch 2642 drivers/isdn/hardware/mISDN/hfcmulti.c if (((!dch) && (!bch)) || (!hc->created[hc->chan[ch].port])) { bch 2653 drivers/isdn/hardware/mISDN/hfcmulti.c if (bch && (r_irq_fifo_bl & (1 << j)) && bch 2654 drivers/isdn/hardware/mISDN/hfcmulti.c test_bit(FLG_ACTIVE, &bch->Flags)) { bch 2665 drivers/isdn/hardware/mISDN/hfcmulti.c if (bch && (r_irq_fifo_bl & (1 << j)) && bch 2666 drivers/isdn/hardware/mISDN/hfcmulti.c test_bit(FLG_ACTIVE, &bch->Flags)) { bch 2993 drivers/isdn/hardware/mISDN/hfcmulti.c if (hc->chan[ch].bch && hc->ctype != HFC_TYPE_E1) { bch 3002 drivers/isdn/hardware/mISDN/hfcmulti.c if (hc->chan[ch].bch) { bch 3003 drivers/isdn/hardware/mISDN/hfcmulti.c test_and_clear_bit(FLG_HDLC, &hc->chan[ch].bch->Flags); bch 3005 drivers/isdn/hardware/mISDN/hfcmulti.c &hc->chan[ch].bch->Flags); bch 3114 drivers/isdn/hardware/mISDN/hfcmulti.c if (hc->chan[ch].bch) bch 3116 drivers/isdn/hardware/mISDN/hfcmulti.c &hc->chan[ch].bch->Flags); bch 3126 drivers/isdn/hardware/mISDN/hfcmulti.c if (hc->ctype == HFC_TYPE_E1 || hc->chan[ch].bch) { bch 3142 drivers/isdn/hardware/mISDN/hfcmulti.c if (hc->ctype == HFC_TYPE_E1 || hc->chan[ch].bch) bch 3149 drivers/isdn/hardware/mISDN/hfcmulti.c if (hc->chan[ch].bch) { bch 3150 drivers/isdn/hardware/mISDN/hfcmulti.c test_and_set_bit(FLG_HDLC, &hc->chan[ch].bch->Flags); bch 3439 drivers/isdn/hardware/mISDN/hfcmulti.c deactivate_bchannel(struct bchannel *bch) bch 3441 drivers/isdn/hardware/mISDN/hfcmulti.c struct hfc_multi *hc = bch->hw; bch 3445 drivers/isdn/hardware/mISDN/hfcmulti.c mISDN_clear_bchannel(bch); bch 3446 drivers/isdn/hardware/mISDN/hfcmulti.c hc->chan[bch->slot].coeff_count = 0; bch 3447 drivers/isdn/hardware/mISDN/hfcmulti.c hc->chan[bch->slot].rx_off = 0; bch 3448 drivers/isdn/hardware/mISDN/hfcmulti.c hc->chan[bch->slot].conf = -1; bch 3449 drivers/isdn/hardware/mISDN/hfcmulti.c mode_hfcmulti(hc, bch->slot, ISDN_P_NONE, -1, 0, -1, 0); bch 3456 drivers/isdn/hardware/mISDN/hfcmulti.c struct bchannel *bch = container_of(ch, struct bchannel, ch); bch 3457 drivers/isdn/hardware/mISDN/hfcmulti.c struct hfc_multi *hc = bch->hw; bch 3467 drivers/isdn/hardware/mISDN/hfcmulti.c ret = bchannel_senddata(bch, skb); bch 3469 drivers/isdn/hardware/mISDN/hfcmulti.c hfcmulti_tx(hc, bch->slot); bch 3480 drivers/isdn/hardware/mISDN/hfcmulti.c __func__, bch->slot); bch 3483 drivers/isdn/hardware/mISDN/hfcmulti.c if (!test_and_set_bit(FLG_ACTIVE, &bch->Flags)) { bch 3484 drivers/isdn/hardware/mISDN/hfcmulti.c hc->chan[bch->slot].txpending = 0; bch 3485 drivers/isdn/hardware/mISDN/hfcmulti.c ret = mode_hfcmulti(hc, bch->slot, bch 3487 drivers/isdn/hardware/mISDN/hfcmulti.c hc->chan[bch->slot].slot_tx, bch 3488 drivers/isdn/hardware/mISDN/hfcmulti.c hc->chan[bch->slot].bank_tx, bch 3489 drivers/isdn/hardware/mISDN/hfcmulti.c hc->chan[bch->slot].slot_rx, bch 3490 drivers/isdn/hardware/mISDN/hfcmulti.c hc->chan[bch->slot].bank_rx); bch 3536 drivers/isdn/hardware/mISDN/hfcmulti.c deactivate_bchannel(bch); /* locked there */ bch 3551 drivers/isdn/hardware/mISDN/hfcmulti.c channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq) bch 3556 drivers/isdn/hardware/mISDN/hfcmulti.c struct hfc_multi *hc = bch->hw; bch 3565 drivers/isdn/hardware/mISDN/hfcmulti.c ret = mISDN_ctrl_bchannel(bch, cq); bch 3569 drivers/isdn/hardware/mISDN/hfcmulti.c ret = mISDN_ctrl_bchannel(bch, cq); bch 3570 drivers/isdn/hardware/mISDN/hfcmulti.c hc->chan[bch->slot].rx_off = !!cq->p1; bch 3571 drivers/isdn/hardware/mISDN/hfcmulti.c if (!hc->chan[bch->slot].rx_off) { bch 3573 drivers/isdn/hardware/mISDN/hfcmulti.c HFC_outb_nodebug(hc, R_FIFO, (bch->slot << 1) | 1); bch 3580 drivers/isdn/hardware/mISDN/hfcmulti.c __func__, bch->nr, hc->chan[bch->slot].rx_off); bch 3583 drivers/isdn/hardware/mISDN/hfcmulti.c ret = mISDN_ctrl_bchannel(bch, cq); bch 3584 drivers/isdn/hardware/mISDN/hfcmulti.c hc->silence = bch->fill[0]; bch 3619 drivers/isdn/hardware/mISDN/hfcmulti.c hfcmulti_pcm(hc, bch->slot, bch 3634 drivers/isdn/hardware/mISDN/hfcmulti.c hfcmulti_pcm(hc, bch->slot, -1, 0, -1, 0); bch 3642 drivers/isdn/hardware/mISDN/hfcmulti.c hfcmulti_conf(hc, bch->slot, num); bch 3653 drivers/isdn/hardware/mISDN/hfcmulti.c hfcmulti_conf(hc, bch->slot, -1); bch 3659 drivers/isdn/hardware/mISDN/hfcmulti.c vpm_echocan_on(hc, bch->slot, cq->p1); bch 3669 drivers/isdn/hardware/mISDN/hfcmulti.c vpm_echocan_off(hc, bch->slot); bch 3674 drivers/isdn/hardware/mISDN/hfcmulti.c ret = mISDN_ctrl_bchannel(bch, cq); bch 3683 drivers/isdn/hardware/mISDN/hfcmulti.c struct bchannel *bch = container_of(ch, struct bchannel, ch); bch 3684 drivers/isdn/hardware/mISDN/hfcmulti.c struct hfc_multi *hc = bch->hw; bch 3688 drivers/isdn/hardware/mISDN/hfcmulti.c if (bch->debug & DEBUG_HW) bch 3693 drivers/isdn/hardware/mISDN/hfcmulti.c test_and_clear_bit(FLG_OPEN, &bch->Flags); bch 3694 drivers/isdn/hardware/mISDN/hfcmulti.c deactivate_bchannel(bch); /* locked there */ bch 3702 drivers/isdn/hardware/mISDN/hfcmulti.c err = channel_bctrl(bch, arg); bch 4085 drivers/isdn/hardware/mISDN/hfcmulti.c struct bchannel *bch; bch 4096 drivers/isdn/hardware/mISDN/hfcmulti.c bch = hc->chan[ch].bch; bch 4097 drivers/isdn/hardware/mISDN/hfcmulti.c if (!bch) { bch 4102 drivers/isdn/hardware/mISDN/hfcmulti.c if (test_and_set_bit(FLG_OPEN, &bch->Flags)) bch 4104 drivers/isdn/hardware/mISDN/hfcmulti.c bch->ch.protocol = rq->protocol; bch 4106 drivers/isdn/hardware/mISDN/hfcmulti.c rq->ch = &bch->ch; bch 4563 drivers/isdn/hardware/mISDN/hfcmulti.c if (hc->chan[i].bch) { bch 4568 drivers/isdn/hardware/mISDN/hfcmulti.c pb = hc->chan[i].bch; bch 4569 drivers/isdn/hardware/mISDN/hfcmulti.c hc->chan[i].bch = NULL; bch 4585 drivers/isdn/hardware/mISDN/hfcmulti.c if (hc->chan[ci - 2].bch) { bch 4591 drivers/isdn/hardware/mISDN/hfcmulti.c pb = hc->chan[ci - 2].bch; bch 4592 drivers/isdn/hardware/mISDN/hfcmulti.c hc->chan[ci - 2].bch = NULL; bch 4599 drivers/isdn/hardware/mISDN/hfcmulti.c if (hc->chan[ci - 1].bch) { bch 4605 drivers/isdn/hardware/mISDN/hfcmulti.c pb = hc->chan[ci - 1].bch; bch 4606 drivers/isdn/hardware/mISDN/hfcmulti.c hc->chan[ci - 1].bch = NULL; bch 4799 drivers/isdn/hardware/mISDN/hfcmulti.c struct bchannel *bch; bch 4822 drivers/isdn/hardware/mISDN/hfcmulti.c bch = kzalloc(sizeof(struct bchannel), GFP_KERNEL); bch 4823 drivers/isdn/hardware/mISDN/hfcmulti.c if (!bch) { bch 4834 drivers/isdn/hardware/mISDN/hfcmulti.c kfree(bch); bch 4837 drivers/isdn/hardware/mISDN/hfcmulti.c bch->nr = ch; bch 4838 drivers/isdn/hardware/mISDN/hfcmulti.c bch->slot = ch; bch 4839 drivers/isdn/hardware/mISDN/hfcmulti.c bch->debug = debug; bch 4840 drivers/isdn/hardware/mISDN/hfcmulti.c mISDN_initbchannel(bch, MAX_DATA_MEM, poll >> 1); bch 4841 drivers/isdn/hardware/mISDN/hfcmulti.c bch->hw = hc; bch 4842 drivers/isdn/hardware/mISDN/hfcmulti.c bch->ch.send = handle_bmsg; bch 4843 drivers/isdn/hardware/mISDN/hfcmulti.c bch->ch.ctrl = hfcm_bctrl; bch 4844 drivers/isdn/hardware/mISDN/hfcmulti.c bch->ch.nr = ch; bch 4845 drivers/isdn/hardware/mISDN/hfcmulti.c list_add(&bch->ch.list, &dch->dev.bchannels); bch 4846 drivers/isdn/hardware/mISDN/hfcmulti.c hc->chan[ch].bch = bch; bch 4848 drivers/isdn/hardware/mISDN/hfcmulti.c set_channelmap(bch->nr, dch->dev.channelmap); bch 4873 drivers/isdn/hardware/mISDN/hfcmulti.c struct bchannel *bch; bch 4895 drivers/isdn/hardware/mISDN/hfcmulti.c bch = kzalloc(sizeof(struct bchannel), GFP_KERNEL); bch 4896 drivers/isdn/hardware/mISDN/hfcmulti.c if (!bch) { bch 4907 drivers/isdn/hardware/mISDN/hfcmulti.c kfree(bch); bch 4910 drivers/isdn/hardware/mISDN/hfcmulti.c bch->nr = ch + 1; bch 4911 drivers/isdn/hardware/mISDN/hfcmulti.c bch->slot = i + ch; bch 4912 drivers/isdn/hardware/mISDN/hfcmulti.c bch->debug = debug; bch 4913 drivers/isdn/hardware/mISDN/hfcmulti.c mISDN_initbchannel(bch, MAX_DATA_MEM, poll >> 1); bch 4914 drivers/isdn/hardware/mISDN/hfcmulti.c bch->hw = hc; bch 4915 drivers/isdn/hardware/mISDN/hfcmulti.c bch->ch.send = handle_bmsg; bch 4916 drivers/isdn/hardware/mISDN/hfcmulti.c bch->ch.ctrl = hfcm_bctrl; bch 4917 drivers/isdn/hardware/mISDN/hfcmulti.c bch->ch.nr = ch + 1; bch 4918 drivers/isdn/hardware/mISDN/hfcmulti.c list_add(&bch->ch.list, &dch->dev.bchannels); bch 4919 drivers/isdn/hardware/mISDN/hfcmulti.c hc->chan[i + ch].bch = bch; bch 4921 drivers/isdn/hardware/mISDN/hfcmulti.c set_channelmap(bch->nr, dch->dev.channelmap); bch 134 drivers/isdn/hardware/mISDN/hfcpci.c struct bchannel bch[2]; bch 308 drivers/isdn/hardware/mISDN/hfcpci.c if (test_bit(FLG_ACTIVE, &hc->bch[0].Flags) && bch 309 drivers/isdn/hardware/mISDN/hfcpci.c (hc->bch[0].nr & channel)) bch 310 drivers/isdn/hardware/mISDN/hfcpci.c return &hc->bch[0]; bch 311 drivers/isdn/hardware/mISDN/hfcpci.c else if (test_bit(FLG_ACTIVE, &hc->bch[1].Flags) && bch 312 drivers/isdn/hardware/mISDN/hfcpci.c (hc->bch[1].nr & channel)) bch 313 drivers/isdn/hardware/mISDN/hfcpci.c return &hc->bch[1]; bch 366 drivers/isdn/hardware/mISDN/hfcpci.c if (hc->bch[fifo].debug & DEBUG_HW_BCHANNEL) bch 380 drivers/isdn/hardware/mISDN/hfcpci.c if (hc->bch[fifo].debug & DEBUG_HW_BCHANNEL) bch 392 drivers/isdn/hardware/mISDN/hfcpci.c hfcpci_empty_bfifo(struct bchannel *bch, struct bzfifo *bz, bch 399 drivers/isdn/hardware/mISDN/hfcpci.c if ((bch->debug & DEBUG_HW_BCHANNEL) && !(bch->debug & DEBUG_HW_BFIFO)) bch 408 drivers/isdn/hardware/mISDN/hfcpci.c if (bch->debug & DEBUG_HW) bch 412 drivers/isdn/hardware/mISDN/hfcpci.c bch->err_inv++; bch 417 drivers/isdn/hardware/mISDN/hfcpci.c bch->rx_skb = mI_alloc_skb(count - 3, GFP_ATOMIC); bch 418 drivers/isdn/hardware/mISDN/hfcpci.c if (!bch->rx_skb) { bch 423 drivers/isdn/hardware/mISDN/hfcpci.c ptr = skb_put(bch->rx_skb, count); bch 443 drivers/isdn/hardware/mISDN/hfcpci.c recv_Bchannel(bch, MISDN_ID_ANY, false); bch 533 drivers/isdn/hardware/mISDN/hfcpci.c hfcpci_empty_fifo_trans(struct bchannel *bch, struct bzfifo *rxbz, bch 562 drivers/isdn/hardware/mISDN/hfcpci.c if (test_bit(FLG_RX_OFF, &bch->Flags)) { bch 563 drivers/isdn/hardware/mISDN/hfcpci.c bch->dropcnt += fcnt_rx; bch 567 drivers/isdn/hardware/mISDN/hfcpci.c maxlen = bchannel_get_rxbuf(bch, fcnt_rx); bch 570 drivers/isdn/hardware/mISDN/hfcpci.c bch->nr, fcnt_rx); bch 572 drivers/isdn/hardware/mISDN/hfcpci.c ptr = skb_put(bch->rx_skb, fcnt_rx); bch 589 drivers/isdn/hardware/mISDN/hfcpci.c recv_Bchannel(bch, fcnt_tx, false); /* bch, id, !force */ bch 598 drivers/isdn/hardware/mISDN/hfcpci.c main_rec_hfcpci(struct bchannel *bch) bch 600 drivers/isdn/hardware/mISDN/hfcpci.c struct hfc_pci *hc = bch->hw; bch 607 drivers/isdn/hardware/mISDN/hfcpci.c if ((bch->nr & 2) && (!hc->hw.bswapped)) { bch 621 drivers/isdn/hardware/mISDN/hfcpci.c if (bch->debug & DEBUG_HW_BCHANNEL) bch 623 drivers/isdn/hardware/mISDN/hfcpci.c bch->nr, rxbz->f1, rxbz->f2); bch 630 drivers/isdn/hardware/mISDN/hfcpci.c if (bch->debug & DEBUG_HW_BCHANNEL) bch 633 drivers/isdn/hardware/mISDN/hfcpci.c bch->nr, le16_to_cpu(zp->z1), bch 635 drivers/isdn/hardware/mISDN/hfcpci.c hfcpci_empty_bfifo(bch, rxbz, bdata, rcnt); bch 648 drivers/isdn/hardware/mISDN/hfcpci.c } else if (test_bit(FLG_TRANSPARENT, &bch->Flags)) { bch 649 drivers/isdn/hardware/mISDN/hfcpci.c hfcpci_empty_fifo_trans(bch, rxbz, txbz, bdata); bch 739 drivers/isdn/hardware/mISDN/hfcpci.c hfcpci_fill_fifo(struct bchannel *bch) bch 741 drivers/isdn/hardware/mISDN/hfcpci.c struct hfc_pci *hc = bch->hw; bch 749 drivers/isdn/hardware/mISDN/hfcpci.c if ((bch->debug & DEBUG_HW_BCHANNEL) && !(bch->debug & DEBUG_HW_BFIFO)) bch 751 drivers/isdn/hardware/mISDN/hfcpci.c if ((!bch->tx_skb) || bch->tx_skb->len == 0) { bch 752 drivers/isdn/hardware/mISDN/hfcpci.c if (!test_bit(FLG_FILLEMPTY, &bch->Flags) && bch 753 drivers/isdn/hardware/mISDN/hfcpci.c !test_bit(FLG_TRANSPARENT, &bch->Flags)) bch 757 drivers/isdn/hardware/mISDN/hfcpci.c count = bch->tx_skb->len - bch->tx_idx; bch 759 drivers/isdn/hardware/mISDN/hfcpci.c if ((bch->nr & 2) && (!hc->hw.bswapped)) { bch 767 drivers/isdn/hardware/mISDN/hfcpci.c if (test_bit(FLG_TRANSPARENT, &bch->Flags)) { bch 770 drivers/isdn/hardware/mISDN/hfcpci.c if (bch->debug & DEBUG_HW_BCHANNEL) bch 772 drivers/isdn/hardware/mISDN/hfcpci.c "cnt(%d) z1(%x) z2(%x)\n", bch->nr, count, bch 777 drivers/isdn/hardware/mISDN/hfcpci.c if (test_bit(FLG_FILLEMPTY, &bch->Flags)) { bch 788 drivers/isdn/hardware/mISDN/hfcpci.c if (bch->debug & DEBUG_HW_BFIFO) bch 794 drivers/isdn/hardware/mISDN/hfcpci.c memset(dst, bch->fill[0], maxlen); /* first copy */ bch 798 drivers/isdn/hardware/mISDN/hfcpci.c memset(dst, bch->fill[0], count); bch 808 drivers/isdn/hardware/mISDN/hfcpci.c count = bch->tx_skb->len - bch->tx_idx; bch 819 drivers/isdn/hardware/mISDN/hfcpci.c src = bch->tx_skb->data + bch->tx_idx; bch 824 drivers/isdn/hardware/mISDN/hfcpci.c if (bch->debug & DEBUG_HW_BFIFO) bch 829 drivers/isdn/hardware/mISDN/hfcpci.c bch->tx_idx += count; bch 840 drivers/isdn/hardware/mISDN/hfcpci.c if (bch->tx_idx < bch->tx_skb->len) bch 842 drivers/isdn/hardware/mISDN/hfcpci.c dev_kfree_skb(bch->tx_skb); bch 843 drivers/isdn/hardware/mISDN/hfcpci.c if (get_next_bframe(bch)) bch 847 drivers/isdn/hardware/mISDN/hfcpci.c if (bch->debug & DEBUG_HW_BCHANNEL) bch 850 drivers/isdn/hardware/mISDN/hfcpci.c __func__, bch->nr, bz->f1, bz->f2, bch 856 drivers/isdn/hardware/mISDN/hfcpci.c if (bch->debug & DEBUG_HW_BCHANNEL) bch 867 drivers/isdn/hardware/mISDN/hfcpci.c if (bch->debug & DEBUG_HW_BCHANNEL) bch 869 drivers/isdn/hardware/mISDN/hfcpci.c bch->nr, count, maxlen); bch 872 drivers/isdn/hardware/mISDN/hfcpci.c if (bch->debug & DEBUG_HW_BCHANNEL) bch 882 drivers/isdn/hardware/mISDN/hfcpci.c src = bch->tx_skb->data + bch->tx_idx; /* source pointer */ bch 898 drivers/isdn/hardware/mISDN/hfcpci.c dev_kfree_skb(bch->tx_skb); bch 899 drivers/isdn/hardware/mISDN/hfcpci.c get_next_bframe(bch); bch 1117 drivers/isdn/hardware/mISDN/hfcpci.c tx_birq(struct bchannel *bch) bch 1119 drivers/isdn/hardware/mISDN/hfcpci.c if (bch->tx_skb && bch->tx_idx < bch->tx_skb->len) bch 1120 drivers/isdn/hardware/mISDN/hfcpci.c hfcpci_fill_fifo(bch); bch 1122 drivers/isdn/hardware/mISDN/hfcpci.c dev_kfree_skb(bch->tx_skb); bch 1123 drivers/isdn/hardware/mISDN/hfcpci.c if (get_next_bframe(bch)) bch 1124 drivers/isdn/hardware/mISDN/hfcpci.c hfcpci_fill_fifo(bch); bch 1145 drivers/isdn/hardware/mISDN/hfcpci.c struct bchannel *bch; bch 1187 drivers/isdn/hardware/mISDN/hfcpci.c bch = Sel_BCS(hc, hc->hw.bswapped ? 2 : 1); bch 1188 drivers/isdn/hardware/mISDN/hfcpci.c if (bch) bch 1189 drivers/isdn/hardware/mISDN/hfcpci.c main_rec_hfcpci(bch); bch 1194 drivers/isdn/hardware/mISDN/hfcpci.c bch = Sel_BCS(hc, 2); bch 1195 drivers/isdn/hardware/mISDN/hfcpci.c if (bch) bch 1196 drivers/isdn/hardware/mISDN/hfcpci.c main_rec_hfcpci(bch); bch 1201 drivers/isdn/hardware/mISDN/hfcpci.c bch = Sel_BCS(hc, hc->hw.bswapped ? 2 : 1); bch 1202 drivers/isdn/hardware/mISDN/hfcpci.c if (bch) bch 1203 drivers/isdn/hardware/mISDN/hfcpci.c tx_birq(bch); bch 1208 drivers/isdn/hardware/mISDN/hfcpci.c bch = Sel_BCS(hc, 2); bch 1209 drivers/isdn/hardware/mISDN/hfcpci.c if (bch) bch 1210 drivers/isdn/hardware/mISDN/hfcpci.c tx_birq(bch); bch 1237 drivers/isdn/hardware/mISDN/hfcpci.c mode_hfcpci(struct bchannel *bch, int bc, int protocol) bch 1239 drivers/isdn/hardware/mISDN/hfcpci.c struct hfc_pci *hc = bch->hw; bch 1243 drivers/isdn/hardware/mISDN/hfcpci.c if (bch->debug & DEBUG_HW_BCHANNEL) bch 1246 drivers/isdn/hardware/mISDN/hfcpci.c bch->state, protocol, bch->nr, bc); bch 1281 drivers/isdn/hardware/mISDN/hfcpci.c bch->state = -1; bch 1282 drivers/isdn/hardware/mISDN/hfcpci.c bch->nr = bc; bch 1285 drivers/isdn/hardware/mISDN/hfcpci.c if (bch->state == ISDN_P_NONE) bch 1304 drivers/isdn/hardware/mISDN/hfcpci.c if (bch->nr & 2) bch 1309 drivers/isdn/hardware/mISDN/hfcpci.c bch->state = ISDN_P_NONE; bch 1310 drivers/isdn/hardware/mISDN/hfcpci.c bch->nr = bc; bch 1311 drivers/isdn/hardware/mISDN/hfcpci.c test_and_clear_bit(FLG_HDLC, &bch->Flags); bch 1312 drivers/isdn/hardware/mISDN/hfcpci.c test_and_clear_bit(FLG_TRANSPARENT, &bch->Flags); bch 1315 drivers/isdn/hardware/mISDN/hfcpci.c bch->state = protocol; bch 1316 drivers/isdn/hardware/mISDN/hfcpci.c bch->nr = bc; bch 1347 drivers/isdn/hardware/mISDN/hfcpci.c test_and_set_bit(FLG_TRANSPARENT, &bch->Flags); bch 1350 drivers/isdn/hardware/mISDN/hfcpci.c bch->state = protocol; bch 1351 drivers/isdn/hardware/mISDN/hfcpci.c bch->nr = bc; bch 1376 drivers/isdn/hardware/mISDN/hfcpci.c test_and_set_bit(FLG_HDLC, &bch->Flags); bch 1430 drivers/isdn/hardware/mISDN/hfcpci.c set_hfcpci_rxtest(struct bchannel *bch, int protocol, int chan) bch 1432 drivers/isdn/hardware/mISDN/hfcpci.c struct hfc_pci *hc = bch->hw; bch 1434 drivers/isdn/hardware/mISDN/hfcpci.c if (bch->debug & DEBUG_HW_BCHANNEL) bch 1437 drivers/isdn/hardware/mISDN/hfcpci.c bch->state, protocol, bch->nr, chan); bch 1438 drivers/isdn/hardware/mISDN/hfcpci.c if (bch->nr != chan) { bch 1441 drivers/isdn/hardware/mISDN/hfcpci.c bch->nr, chan); bch 1446 drivers/isdn/hardware/mISDN/hfcpci.c bch->state = protocol; bch 1471 drivers/isdn/hardware/mISDN/hfcpci.c bch->state = protocol; bch 1505 drivers/isdn/hardware/mISDN/hfcpci.c deactivate_bchannel(struct bchannel *bch) bch 1507 drivers/isdn/hardware/mISDN/hfcpci.c struct hfc_pci *hc = bch->hw; bch 1511 drivers/isdn/hardware/mISDN/hfcpci.c mISDN_clear_bchannel(bch); bch 1512 drivers/isdn/hardware/mISDN/hfcpci.c mode_hfcpci(bch, bch->nr, ISDN_P_NONE); bch 1520 drivers/isdn/hardware/mISDN/hfcpci.c channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq) bch 1522 drivers/isdn/hardware/mISDN/hfcpci.c return mISDN_ctrl_bchannel(bch, cq); bch 1527 drivers/isdn/hardware/mISDN/hfcpci.c struct bchannel *bch = container_of(ch, struct bchannel, ch); bch 1528 drivers/isdn/hardware/mISDN/hfcpci.c struct hfc_pci *hc = bch->hw; bch 1532 drivers/isdn/hardware/mISDN/hfcpci.c if (bch->debug & DEBUG_HW) bch 1537 drivers/isdn/hardware/mISDN/hfcpci.c ret = set_hfcpci_rxtest(bch, ISDN_P_B_RAW, (int)(long)arg); bch 1542 drivers/isdn/hardware/mISDN/hfcpci.c ret = set_hfcpci_rxtest(bch, ISDN_P_B_HDLC, (int)(long)arg); bch 1547 drivers/isdn/hardware/mISDN/hfcpci.c mode_hfcpci(bch, bch->nr, ISDN_P_NONE); bch 1552 drivers/isdn/hardware/mISDN/hfcpci.c test_and_clear_bit(FLG_OPEN, &bch->Flags); bch 1553 drivers/isdn/hardware/mISDN/hfcpci.c deactivate_bchannel(bch); bch 1560 drivers/isdn/hardware/mISDN/hfcpci.c ret = channel_bctrl(bch, arg); bch 1659 drivers/isdn/hardware/mISDN/hfcpci.c struct bchannel *bch = container_of(ch, struct bchannel, ch); bch 1660 drivers/isdn/hardware/mISDN/hfcpci.c struct hfc_pci *hc = bch->hw; bch 1668 drivers/isdn/hardware/mISDN/hfcpci.c ret = bchannel_senddata(bch, skb); bch 1670 drivers/isdn/hardware/mISDN/hfcpci.c hfcpci_fill_fifo(bch); bch 1677 drivers/isdn/hardware/mISDN/hfcpci.c if (!test_and_set_bit(FLG_ACTIVE, &bch->Flags)) bch 1678 drivers/isdn/hardware/mISDN/hfcpci.c ret = mode_hfcpci(bch, bch->nr, ch->protocol); bch 1687 drivers/isdn/hardware/mISDN/hfcpci.c deactivate_bchannel(bch); bch 1708 drivers/isdn/hardware/mISDN/hfcpci.c mode_hfcpci(&hc->bch[0], 1, -1); bch 1709 drivers/isdn/hardware/mISDN/hfcpci.c mode_hfcpci(&hc->bch[1], 2, -1); bch 1927 drivers/isdn/hardware/mISDN/hfcpci.c struct bchannel *bch; bch 1933 drivers/isdn/hardware/mISDN/hfcpci.c bch = &hc->bch[rq->adr.channel - 1]; bch 1934 drivers/isdn/hardware/mISDN/hfcpci.c if (test_and_set_bit(FLG_OPEN, &bch->Flags)) bch 1936 drivers/isdn/hardware/mISDN/hfcpci.c bch->ch.protocol = rq->protocol; bch 1937 drivers/isdn/hardware/mISDN/hfcpci.c rq->ch = &bch->ch; /* TODO: E-channel */ bch 2053 drivers/isdn/hardware/mISDN/hfcpci.c mode_hfcpci(&hc->bch[0], 1, ISDN_P_NONE); bch 2054 drivers/isdn/hardware/mISDN/hfcpci.c mode_hfcpci(&hc->bch[1], 2, ISDN_P_NONE); bch 2066 drivers/isdn/hardware/mISDN/hfcpci.c mISDN_freebchannel(&hc->bch[1]); bch 2067 drivers/isdn/hardware/mISDN/hfcpci.c mISDN_freebchannel(&hc->bch[0]); bch 2091 drivers/isdn/hardware/mISDN/hfcpci.c card->bch[i].nr = i + 1; bch 2093 drivers/isdn/hardware/mISDN/hfcpci.c card->bch[i].debug = debug; bch 2094 drivers/isdn/hardware/mISDN/hfcpci.c mISDN_initbchannel(&card->bch[i], MAX_DATA_MEM, poll >> 1); bch 2095 drivers/isdn/hardware/mISDN/hfcpci.c card->bch[i].hw = card; bch 2096 drivers/isdn/hardware/mISDN/hfcpci.c card->bch[i].ch.send = hfcpci_l2l1B; bch 2097 drivers/isdn/hardware/mISDN/hfcpci.c card->bch[i].ch.ctrl = hfc_bctrl; bch 2098 drivers/isdn/hardware/mISDN/hfcpci.c card->bch[i].ch.nr = i + 1; bch 2099 drivers/isdn/hardware/mISDN/hfcpci.c list_add(&card->bch[i].ch.list, &card->dch.dev.bchannels); bch 2112 drivers/isdn/hardware/mISDN/hfcpci.c mISDN_freebchannel(&card->bch[1]); bch 2113 drivers/isdn/hardware/mISDN/hfcpci.c mISDN_freebchannel(&card->bch[0]); bch 2265 drivers/isdn/hardware/mISDN/hfcpci.c struct bchannel *bch; bch 2271 drivers/isdn/hardware/mISDN/hfcpci.c bch = Sel_BCS(hc, hc->hw.bswapped ? 2 : 1); bch 2272 drivers/isdn/hardware/mISDN/hfcpci.c if (bch && bch->state == ISDN_P_B_RAW) { /* B1 rx&tx */ bch 2273 drivers/isdn/hardware/mISDN/hfcpci.c main_rec_hfcpci(bch); bch 2274 drivers/isdn/hardware/mISDN/hfcpci.c tx_birq(bch); bch 2276 drivers/isdn/hardware/mISDN/hfcpci.c bch = Sel_BCS(hc, hc->hw.bswapped ? 1 : 2); bch 2277 drivers/isdn/hardware/mISDN/hfcpci.c if (bch && bch->state == ISDN_P_B_RAW) { /* B2 rx&tx */ bch 2278 drivers/isdn/hardware/mISDN/hfcpci.c main_rec_hfcpci(bch); bch 2279 drivers/isdn/hardware/mISDN/hfcpci.c tx_birq(bch); bch 47 drivers/isdn/hardware/mISDN/hfcsusb.c static int hfcsusb_setup_bch(struct bchannel *bch, int protocol); bch 48 drivers/isdn/hardware/mISDN/hfcsusb.c static void deactivate_bchannel(struct bchannel *bch); bch 198 drivers/isdn/hardware/mISDN/hfcsusb.c struct bchannel *bch = container_of(ch, struct bchannel, ch); bch 199 drivers/isdn/hardware/mISDN/hfcsusb.c struct hfcsusb *hw = bch->hw; bch 210 drivers/isdn/hardware/mISDN/hfcsusb.c ret = bchannel_senddata(bch, skb); bch 219 drivers/isdn/hardware/mISDN/hfcsusb.c if (!test_and_set_bit(FLG_ACTIVE, &bch->Flags)) { bch 220 drivers/isdn/hardware/mISDN/hfcsusb.c hfcsusb_start_endpoint(hw, bch->nr - 1); bch 221 drivers/isdn/hardware/mISDN/hfcsusb.c ret = hfcsusb_setup_bch(bch, ch->protocol); bch 229 drivers/isdn/hardware/mISDN/hfcsusb.c deactivate_bchannel(bch); bch 251 drivers/isdn/hardware/mISDN/hfcsusb.c phi = kzalloc(struct_size(phi, bch, dch->dev.nrbchan), GFP_ATOMIC); bch 260 drivers/isdn/hardware/mISDN/hfcsusb.c phi->bch[i].protocol = hw->bch[i].ch.protocol; bch 261 drivers/isdn/hardware/mISDN/hfcsusb.c phi->bch[i].Flags = hw->bch[i].Flags; bch 468 drivers/isdn/hardware/mISDN/hfcsusb.c struct bchannel *bch; bch 479 drivers/isdn/hardware/mISDN/hfcsusb.c bch = &hw->bch[rq->adr.channel - 1]; bch 480 drivers/isdn/hardware/mISDN/hfcsusb.c if (test_and_set_bit(FLG_OPEN, &bch->Flags)) bch 482 drivers/isdn/hardware/mISDN/hfcsusb.c bch->ch.protocol = rq->protocol; bch 483 drivers/isdn/hardware/mISDN/hfcsusb.c rq->ch = &bch->ch; bch 681 drivers/isdn/hardware/mISDN/hfcsusb.c hfcsusb_setup_bch(struct bchannel *bch, int protocol) bch 683 drivers/isdn/hardware/mISDN/hfcsusb.c struct hfcsusb *hw = bch->hw; bch 688 drivers/isdn/hardware/mISDN/hfcsusb.c hw->name, __func__, bch->state, protocol, bch 689 drivers/isdn/hardware/mISDN/hfcsusb.c bch->nr); bch 698 drivers/isdn/hardware/mISDN/hfcsusb.c bch->state = -1; bch 701 drivers/isdn/hardware/mISDN/hfcsusb.c if (bch->state == ISDN_P_NONE) bch 703 drivers/isdn/hardware/mISDN/hfcsusb.c bch->state = ISDN_P_NONE; bch 704 drivers/isdn/hardware/mISDN/hfcsusb.c clear_bit(FLG_HDLC, &bch->Flags); bch 705 drivers/isdn/hardware/mISDN/hfcsusb.c clear_bit(FLG_TRANSPARENT, &bch->Flags); bch 709 drivers/isdn/hardware/mISDN/hfcsusb.c bch->state = protocol; bch 710 drivers/isdn/hardware/mISDN/hfcsusb.c set_bit(FLG_TRANSPARENT, &bch->Flags); bch 713 drivers/isdn/hardware/mISDN/hfcsusb.c bch->state = protocol; bch 714 drivers/isdn/hardware/mISDN/hfcsusb.c set_bit(FLG_HDLC, &bch->Flags); bch 724 drivers/isdn/hardware/mISDN/hfcsusb.c write_reg(hw, HFCUSB_FIFO, (bch->nr == 1) ? 0 : 2); bch 727 drivers/isdn/hardware/mISDN/hfcsusb.c write_reg(hw, HFCUSB_FIFO, (bch->nr == 1) ? 1 : 3); bch 733 drivers/isdn/hardware/mISDN/hfcsusb.c if (test_bit(FLG_ACTIVE, &hw->bch[0].Flags)) { bch 737 drivers/isdn/hardware/mISDN/hfcsusb.c if (test_bit(FLG_ACTIVE, &hw->bch[1].Flags)) { bch 745 drivers/isdn/hardware/mISDN/hfcsusb.c handle_led(hw, (bch->nr == 1) ? LED_B1_ON : LED_B2_ON); bch 747 drivers/isdn/hardware/mISDN/hfcsusb.c handle_led(hw, (bch->nr == 1) ? LED_B1_OFF : bch 794 drivers/isdn/hardware/mISDN/hfcsusb.c channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq) bch 796 drivers/isdn/hardware/mISDN/hfcsusb.c return mISDN_ctrl_bchannel(bch, cq); bch 816 drivers/isdn/hardware/mISDN/hfcsusb.c fifo->dch, fifo->bch, fifo->ech); bch 821 drivers/isdn/hardware/mISDN/hfcsusb.c if ((!!fifo->dch + !!fifo->bch + !!fifo->ech) != 1) { bch 833 drivers/isdn/hardware/mISDN/hfcsusb.c if (fifo->bch) { bch 834 drivers/isdn/hardware/mISDN/hfcsusb.c if (test_bit(FLG_RX_OFF, &fifo->bch->Flags)) { bch 835 drivers/isdn/hardware/mISDN/hfcsusb.c fifo->bch->dropcnt += len; bch 839 drivers/isdn/hardware/mISDN/hfcsusb.c maxlen = bchannel_get_rxbuf(fifo->bch, len); bch 840 drivers/isdn/hardware/mISDN/hfcsusb.c rx_skb = fifo->bch->rx_skb; bch 845 drivers/isdn/hardware/mISDN/hfcsusb.c hw->name, fifo->bch->nr, len); bch 849 drivers/isdn/hardware/mISDN/hfcsusb.c maxlen = fifo->bch->maxlen; bch 850 drivers/isdn/hardware/mISDN/hfcsusb.c hdlc = test_bit(FLG_HDLC, &fifo->bch->Flags); bch 909 drivers/isdn/hardware/mISDN/hfcsusb.c if (fifo->bch) bch 910 drivers/isdn/hardware/mISDN/hfcsusb.c recv_Bchannel(fifo->bch, MISDN_ID_ANY, bch 932 drivers/isdn/hardware/mISDN/hfcsusb.c recv_Bchannel(fifo->bch, MISDN_ID_ANY, false); bch 1180 drivers/isdn/hardware/mISDN/hfcsusb.c } else if (fifo->bch) { bch 1181 drivers/isdn/hardware/mISDN/hfcsusb.c tx_skb = fifo->bch->tx_skb; bch 1182 drivers/isdn/hardware/mISDN/hfcsusb.c tx_idx = &fifo->bch->tx_idx; bch 1183 drivers/isdn/hardware/mISDN/hfcsusb.c hdlc = test_bit(FLG_HDLC, &fifo->bch->Flags); bch 1185 drivers/isdn/hardware/mISDN/hfcsusb.c test_bit(FLG_FILLEMPTY, &fifo->bch->Flags)) bch 1279 drivers/isdn/hardware/mISDN/hfcsusb.c memset(p, fifo->bch->fill[0], bch 1339 drivers/isdn/hardware/mISDN/hfcsusb.c else if (fifo->bch && bch 1340 drivers/isdn/hardware/mISDN/hfcsusb.c get_next_bframe(fifo->bch)) bch 1341 drivers/isdn/hardware/mISDN/hfcsusb.c tx_skb = fifo->bch->tx_skb; bch 1763 drivers/isdn/hardware/mISDN/hfcsusb.c mISDN_freebchannel(&hw->bch[1]); bch 1764 drivers/isdn/hardware/mISDN/hfcsusb.c mISDN_freebchannel(&hw->bch[0]); bch 1781 drivers/isdn/hardware/mISDN/hfcsusb.c deactivate_bchannel(struct bchannel *bch) bch 1783 drivers/isdn/hardware/mISDN/hfcsusb.c struct hfcsusb *hw = bch->hw; bch 1786 drivers/isdn/hardware/mISDN/hfcsusb.c if (bch->debug & DEBUG_HW) bch 1788 drivers/isdn/hardware/mISDN/hfcsusb.c hw->name, __func__, bch->nr); bch 1791 drivers/isdn/hardware/mISDN/hfcsusb.c mISDN_clear_bchannel(bch); bch 1793 drivers/isdn/hardware/mISDN/hfcsusb.c hfcsusb_setup_bch(bch, ISDN_P_NONE); bch 1794 drivers/isdn/hardware/mISDN/hfcsusb.c hfcsusb_stop_endpoint(hw, bch->nr - 1); bch 1803 drivers/isdn/hardware/mISDN/hfcsusb.c struct bchannel *bch = container_of(ch, struct bchannel, ch); bch 1806 drivers/isdn/hardware/mISDN/hfcsusb.c if (bch->debug & DEBUG_HW) bch 1817 drivers/isdn/hardware/mISDN/hfcsusb.c test_and_clear_bit(FLG_OPEN, &bch->Flags); bch 1818 drivers/isdn/hardware/mISDN/hfcsusb.c deactivate_bchannel(bch); bch 1825 drivers/isdn/hardware/mISDN/hfcsusb.c ret = channel_bctrl(bch, arg); bch 1861 drivers/isdn/hardware/mISDN/hfcsusb.c hw->bch[i].nr = i + 1; bch 1863 drivers/isdn/hardware/mISDN/hfcsusb.c hw->bch[i].debug = debug; bch 1864 drivers/isdn/hardware/mISDN/hfcsusb.c mISDN_initbchannel(&hw->bch[i], MAX_DATA_MEM, poll >> 1); bch 1865 drivers/isdn/hardware/mISDN/hfcsusb.c hw->bch[i].hw = hw; bch 1866 drivers/isdn/hardware/mISDN/hfcsusb.c hw->bch[i].ch.send = hfcusb_l2l1B; bch 1867 drivers/isdn/hardware/mISDN/hfcsusb.c hw->bch[i].ch.ctrl = hfc_bctrl; bch 1868 drivers/isdn/hardware/mISDN/hfcsusb.c hw->bch[i].ch.nr = i + 1; bch 1869 drivers/isdn/hardware/mISDN/hfcsusb.c list_add(&hw->bch[i].ch.list, &hw->dch.dev.bchannels); bch 1872 drivers/isdn/hardware/mISDN/hfcsusb.c hw->fifos[HFCUSB_B1_TX].bch = &hw->bch[0]; bch 1873 drivers/isdn/hardware/mISDN/hfcsusb.c hw->fifos[HFCUSB_B1_RX].bch = &hw->bch[0]; bch 1874 drivers/isdn/hardware/mISDN/hfcsusb.c hw->fifos[HFCUSB_B2_TX].bch = &hw->bch[1]; bch 1875 drivers/isdn/hardware/mISDN/hfcsusb.c hw->fifos[HFCUSB_B2_RX].bch = &hw->bch[1]; bch 1901 drivers/isdn/hardware/mISDN/hfcsusb.c mISDN_freebchannel(&hw->bch[1]); bch 1902 drivers/isdn/hardware/mISDN/hfcsusb.c mISDN_freebchannel(&hw->bch[0]); bch 265 drivers/isdn/hardware/mISDN/hfcsusb.h struct bchannel *bch; /* link to hfcsusb_t->bch */ bch 274 drivers/isdn/hardware/mISDN/hfcsusb.h struct bchannel bch[2]; bch 47 drivers/isdn/hardware/mISDN/ipac.h struct bchannel bch; bch 16 drivers/isdn/hardware/mISDN/isar.h struct bchannel bch; bch 227 drivers/isdn/hardware/mISDN/mISDNinfineon.c card->ipac.hscx[0].bch.debug = debug; bch 228 drivers/isdn/hardware/mISDN/mISDNinfineon.c card->ipac.hscx[1].bch.debug = debug; bch 885 drivers/isdn/hardware/mISDN/mISDNipac.c pr_debug("%s: B%1d CEC %d us\n", hx->ip->name, hx->bch.nr, bch 888 drivers/isdn/hardware/mISDN/mISDNipac.c pr_info("%s: B%1d CEC timeout\n", hx->ip->name, hx->bch.nr); bch 905 drivers/isdn/hardware/mISDN/mISDNipac.c pr_debug("%s: B%1d XFW %d us\n", hx->ip->name, hx->bch.nr, bch 908 drivers/isdn/hardware/mISDN/mISDNipac.c pr_info("%s: B%1d XFW timeout\n", hx->ip->name, hx->bch.nr); bch 928 drivers/isdn/hardware/mISDN/mISDNipac.c pr_debug("%s: B%1d %d\n", hscx->ip->name, hscx->bch.nr, count); bch 929 drivers/isdn/hardware/mISDN/mISDNipac.c if (test_bit(FLG_RX_OFF, &hscx->bch.Flags)) { bch 930 drivers/isdn/hardware/mISDN/mISDNipac.c hscx->bch.dropcnt += count; bch 934 drivers/isdn/hardware/mISDN/mISDNipac.c maxlen = bchannel_get_rxbuf(&hscx->bch, count); bch 937 drivers/isdn/hardware/mISDN/mISDNipac.c if (hscx->bch.rx_skb) bch 938 drivers/isdn/hardware/mISDN/mISDNipac.c skb_trim(hscx->bch.rx_skb, 0); bch 940 drivers/isdn/hardware/mISDN/mISDNipac.c hscx->ip->name, hscx->bch.nr, count); bch 943 drivers/isdn/hardware/mISDN/mISDNipac.c p = skb_put(hscx->bch.rx_skb, count); bch 954 drivers/isdn/hardware/mISDN/mISDNipac.c if (hscx->bch.debug & DEBUG_HW_BFIFO) { bch 956 drivers/isdn/hardware/mISDN/mISDNipac.c hscx->bch.nr, hscx->ip->name, count); bch 967 drivers/isdn/hardware/mISDN/mISDNipac.c if (!hscx->bch.tx_skb) { bch 968 drivers/isdn/hardware/mISDN/mISDNipac.c if (!test_bit(FLG_TX_EMPTY, &hscx->bch.Flags)) bch 973 drivers/isdn/hardware/mISDN/mISDNipac.c memset(p, hscx->bch.fill[0], count); bch 975 drivers/isdn/hardware/mISDN/mISDNipac.c count = hscx->bch.tx_skb->len - hscx->bch.tx_idx; bch 978 drivers/isdn/hardware/mISDN/mISDNipac.c p = hscx->bch.tx_skb->data + hscx->bch.tx_idx; bch 980 drivers/isdn/hardware/mISDN/mISDNipac.c more = test_bit(FLG_TRANSPARENT, &hscx->bch.Flags) ? 1 : 0; bch 985 drivers/isdn/hardware/mISDN/mISDNipac.c pr_debug("%s: B%1d %d/%d/%d\n", hscx->ip->name, hscx->bch.nr, bch 986 drivers/isdn/hardware/mISDN/mISDNipac.c count, hscx->bch.tx_idx, hscx->bch.tx_skb->len); bch 987 drivers/isdn/hardware/mISDN/mISDNipac.c hscx->bch.tx_idx += count; bch 999 drivers/isdn/hardware/mISDN/mISDNipac.c if (hscx->bch.tx_skb && (hscx->bch.debug & DEBUG_HW_BFIFO)) { bch 1001 drivers/isdn/hardware/mISDN/mISDNipac.c hscx->bch.nr, hscx->ip->name, count); bch 1009 drivers/isdn/hardware/mISDN/mISDNipac.c if (hx->bch.tx_skb && hx->bch.tx_idx < hx->bch.tx_skb->len) { bch 1012 drivers/isdn/hardware/mISDN/mISDNipac.c dev_kfree_skb(hx->bch.tx_skb); bch 1013 drivers/isdn/hardware/mISDN/mISDNipac.c if (get_next_bframe(&hx->bch)) { bch 1015 drivers/isdn/hardware/mISDN/mISDNipac.c test_and_clear_bit(FLG_TX_EMPTY, &hx->bch.Flags); bch 1016 drivers/isdn/hardware/mISDN/mISDNipac.c } else if (test_bit(FLG_TX_EMPTY, &hx->bch.Flags)) { bch 1032 drivers/isdn/hardware/mISDN/mISDNipac.c pr_debug("%s: B%1d RSTAB %02x\n", hx->ip->name, hx->bch.nr, rstab); bch 1036 drivers/isdn/hardware/mISDN/mISDNipac.c if (hx->bch.debug & DEBUG_HW_BCHANNEL) bch 1038 drivers/isdn/hardware/mISDN/mISDNipac.c hx->ip->name, hx->bch.nr); bch 1041 drivers/isdn/hardware/mISDN/mISDNipac.c if (hx->bch.debug & DEBUG_HW_BCHANNEL) bch 1043 drivers/isdn/hardware/mISDN/mISDNipac.c hx->ip->name, hx->bch.nr, bch 1044 drivers/isdn/hardware/mISDN/mISDNipac.c hx->bch.state); bch 1047 drivers/isdn/hardware/mISDN/mISDNipac.c if (hx->bch.debug & DEBUG_HW_BCHANNEL) bch 1049 drivers/isdn/hardware/mISDN/mISDNipac.c hx->ip->name, hx->bch.nr); bch 1062 drivers/isdn/hardware/mISDN/mISDNipac.c if (!hx->bch.rx_skb) bch 1064 drivers/isdn/hardware/mISDN/mISDNipac.c if (hx->bch.rx_skb->len < 2) { bch 1066 drivers/isdn/hardware/mISDN/mISDNipac.c hx->ip->name, hx->bch.nr, hx->bch.rx_skb->len); bch 1067 drivers/isdn/hardware/mISDN/mISDNipac.c skb_trim(hx->bch.rx_skb, 0); bch 1069 drivers/isdn/hardware/mISDN/mISDNipac.c skb_trim(hx->bch.rx_skb, hx->bch.rx_skb->len - 1); bch 1070 drivers/isdn/hardware/mISDN/mISDNipac.c recv_Bchannel(&hx->bch, 0, false); bch 1083 drivers/isdn/hardware/mISDN/mISDNipac.c m = (hx->bch.nr & 1) ? IPAC__EXA : IPAC__EXB; bch 1087 drivers/isdn/hardware/mISDN/mISDNipac.c hx->bch.nr, exirb); bch 1089 drivers/isdn/hardware/mISDN/mISDNipac.c } else if (hx->bch.nr & 2) { /* HSCX B */ bch 1095 drivers/isdn/hardware/mISDN/mISDNipac.c hx->bch.nr, exirb); bch 1103 drivers/isdn/hardware/mISDN/mISDNipac.c hx->bch.nr, exirb); bch 1111 drivers/isdn/hardware/mISDN/mISDNipac.c pr_debug("%s: B%1d ISTAB %02x\n", hx->ip->name, hx->bch.nr, istab); bch 1113 drivers/isdn/hardware/mISDN/mISDNipac.c if (!test_bit(FLG_ACTIVE, &hx->bch.Flags)) bch 1121 drivers/isdn/hardware/mISDN/mISDNipac.c if (test_bit(FLG_TRANSPARENT, &hx->bch.Flags)) bch 1122 drivers/isdn/hardware/mISDN/mISDNipac.c recv_Bchannel(&hx->bch, 0, false); bch 1126 drivers/isdn/hardware/mISDN/mISDNipac.c pr_debug("%s: B%1d RFO error\n", hx->ip->name, hx->bch.nr); bch 1134 drivers/isdn/hardware/mISDN/mISDNipac.c if (test_bit(FLG_TRANSPARENT, &hx->bch.Flags)) { bch 1135 drivers/isdn/hardware/mISDN/mISDNipac.c if (test_bit(FLG_FILLEMPTY, &hx->bch.Flags)) bch 1136 drivers/isdn/hardware/mISDN/mISDNipac.c test_and_set_bit(FLG_TX_EMPTY, &hx->bch.Flags); bch 1141 drivers/isdn/hardware/mISDN/mISDNipac.c hx->bch.nr, hx->bch.tx_idx); bch 1142 drivers/isdn/hardware/mISDN/mISDNipac.c hx->bch.tx_idx = 0; bch 1215 drivers/isdn/hardware/mISDN/mISDNipac.c '@' + hscx->bch.nr, hscx->bch.state, bprotocol, hscx->bch.nr); bch 1217 drivers/isdn/hardware/mISDN/mISDNipac.c if (hscx->bch.nr & 1) { /* B1 and ICA */ bch 1230 drivers/isdn/hardware/mISDN/mISDNipac.c test_and_clear_bit(FLG_HDLC, &hscx->bch.Flags); bch 1231 drivers/isdn/hardware/mISDN/mISDNipac.c test_and_clear_bit(FLG_TRANSPARENT, &hscx->bch.Flags); bch 1238 drivers/isdn/hardware/mISDN/mISDNipac.c test_and_set_bit(FLG_TRANSPARENT, &hscx->bch.Flags); bch 1245 drivers/isdn/hardware/mISDN/mISDNipac.c test_and_set_bit(FLG_HDLC, &hscx->bch.Flags); bch 1266 drivers/isdn/hardware/mISDN/mISDNipac.c test_and_clear_bit(FLG_HDLC, &hscx->bch.Flags); bch 1267 drivers/isdn/hardware/mISDN/mISDNipac.c test_and_clear_bit(FLG_TRANSPARENT, &hscx->bch.Flags); bch 1274 drivers/isdn/hardware/mISDN/mISDNipac.c test_and_set_bit(FLG_TRANSPARENT, &hscx->bch.Flags); bch 1281 drivers/isdn/hardware/mISDN/mISDNipac.c test_and_set_bit(FLG_HDLC, &hscx->bch.Flags); bch 1302 drivers/isdn/hardware/mISDN/mISDNipac.c test_and_clear_bit(FLG_HDLC, &hscx->bch.Flags); bch 1303 drivers/isdn/hardware/mISDN/mISDNipac.c test_and_clear_bit(FLG_TRANSPARENT, &hscx->bch.Flags); bch 1310 drivers/isdn/hardware/mISDN/mISDNipac.c test_and_set_bit(FLG_TRANSPARENT, &hscx->bch.Flags); bch 1317 drivers/isdn/hardware/mISDN/mISDNipac.c test_and_set_bit(FLG_HDLC, &hscx->bch.Flags); bch 1326 drivers/isdn/hardware/mISDN/mISDNipac.c hscx->bch.state = bprotocol; bch 1333 drivers/isdn/hardware/mISDN/mISDNipac.c struct bchannel *bch = container_of(ch, struct bchannel, ch); bch 1334 drivers/isdn/hardware/mISDN/mISDNipac.c struct hscx_hw *hx = container_of(bch, struct hscx_hw, bch); bch 1342 drivers/isdn/hardware/mISDN/mISDNipac.c ret = bchannel_senddata(bch, skb); bch 1351 drivers/isdn/hardware/mISDN/mISDNipac.c if (!test_and_set_bit(FLG_ACTIVE, &bch->Flags)) bch 1362 drivers/isdn/hardware/mISDN/mISDNipac.c mISDN_clear_bchannel(bch); bch 1380 drivers/isdn/hardware/mISDN/mISDNipac.c channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq) bch 1382 drivers/isdn/hardware/mISDN/mISDNipac.c return mISDN_ctrl_bchannel(bch, cq); bch 1388 drivers/isdn/hardware/mISDN/mISDNipac.c struct bchannel *bch = container_of(ch, struct bchannel, ch); bch 1389 drivers/isdn/hardware/mISDN/mISDNipac.c struct hscx_hw *hx = container_of(bch, struct hscx_hw, bch); bch 1396 drivers/isdn/hardware/mISDN/mISDNipac.c test_and_clear_bit(FLG_OPEN, &bch->Flags); bch 1397 drivers/isdn/hardware/mISDN/mISDNipac.c cancel_work_sync(&bch->workq); bch 1399 drivers/isdn/hardware/mISDN/mISDNipac.c mISDN_clear_bchannel(bch); bch 1408 drivers/isdn/hardware/mISDN/mISDNipac.c ret = channel_bctrl(bch, arg); bch 1442 drivers/isdn/hardware/mISDN/mISDNipac.c if (hx->bch.debug & DEBUG_HW) bch 1471 drivers/isdn/hardware/mISDN/mISDNipac.c if (ipac->hscx[0].bch.debug & DEBUG_HW) bch 1481 drivers/isdn/hardware/mISDN/mISDNipac.c struct bchannel *bch; bch 1487 drivers/isdn/hardware/mISDN/mISDNipac.c bch = &ipac->hscx[rq->adr.channel - 1].bch; bch 1488 drivers/isdn/hardware/mISDN/mISDNipac.c if (test_and_set_bit(FLG_OPEN, &bch->Flags)) bch 1490 drivers/isdn/hardware/mISDN/mISDNipac.c test_and_clear_bit(FLG_FILLEMPTY, &bch->Flags); bch 1491 drivers/isdn/hardware/mISDN/mISDNipac.c bch->ch.protocol = rq->protocol; bch 1492 drivers/isdn/hardware/mISDN/mISDNipac.c rq->ch = &bch->ch; bch 1597 drivers/isdn/hardware/mISDN/mISDNipac.c ipac->hscx[i].bch.nr = i + 1; bch 1599 drivers/isdn/hardware/mISDN/mISDNipac.c list_add(&ipac->hscx[i].bch.ch.list, bch 1601 drivers/isdn/hardware/mISDN/mISDNipac.c mISDN_initbchannel(&ipac->hscx[i].bch, MAX_DATA_MEM, bch 1603 drivers/isdn/hardware/mISDN/mISDNipac.c ipac->hscx[i].bch.ch.nr = i + 1; bch 1604 drivers/isdn/hardware/mISDN/mISDNipac.c ipac->hscx[i].bch.ch.send = &hscx_l2l1; bch 1605 drivers/isdn/hardware/mISDN/mISDNipac.c ipac->hscx[i].bch.ch.ctrl = hscx_bctrl; bch 1606 drivers/isdn/hardware/mISDN/mISDNipac.c ipac->hscx[i].bch.hw = hw; bch 69 drivers/isdn/hardware/mISDN/mISDNisar.c if (isar->ch[0].bch.debug & DEBUG_HW_BFIFO) { bch 98 drivers/isdn/hardware/mISDN/mISDNisar.c if (isar->ch[0].bch.debug & DEBUG_HW_BFIFO) { bch 175 drivers/isdn/hardware/mISDN/mISDNisar.c u32 saved_debug = isar->ch[0].bch.debug; bch 194 drivers/isdn/hardware/mISDN/mISDNisar.c isar->ch[0].bch.debug &= ~DEBUG_HW_BFIFO; bch 281 drivers/isdn/hardware/mISDN/mISDNisar.c isar->ch[0].bch.debug = saved_debug; bch 393 drivers/isdn/hardware/mISDN/mISDNisar.c isar->ch[0].bch.debug = saved_debug; bch 405 drivers/isdn/hardware/mISDN/mISDNisar.c _queue_data(&ch->bch.ch, PH_CONTROL_IND, status, 0, NULL, GFP_ATOMIC); bch 419 drivers/isdn/hardware/mISDN/mISDNisar.c if (test_bit(FLG_RX_OFF, &ch->bch.Flags)) { bch 420 drivers/isdn/hardware/mISDN/mISDNisar.c ch->bch.dropcnt += ch->is->clsb; bch 424 drivers/isdn/hardware/mISDN/mISDNisar.c switch (ch->bch.state) { bch 433 drivers/isdn/hardware/mISDN/mISDNisar.c maxlen = bchannel_get_rxbuf(&ch->bch, ch->is->clsb); bch 436 drivers/isdn/hardware/mISDN/mISDNisar.c ch->is->name, ch->bch.nr, ch->is->clsb); bch 440 drivers/isdn/hardware/mISDN/mISDNisar.c rcv_mbox(ch->is, skb_put(ch->bch.rx_skb, ch->is->clsb)); bch 441 drivers/isdn/hardware/mISDN/mISDNisar.c recv_Bchannel(&ch->bch, 0, false); bch 444 drivers/isdn/hardware/mISDN/mISDNisar.c maxlen = bchannel_get_rxbuf(&ch->bch, ch->is->clsb); bch 447 drivers/isdn/hardware/mISDN/mISDNisar.c ch->is->name, ch->bch.nr, ch->is->clsb); bch 456 drivers/isdn/hardware/mISDN/mISDNisar.c ch->bch.err_inv++; bch 458 drivers/isdn/hardware/mISDN/mISDNisar.c ch->bch.err_crc++; bch 460 drivers/isdn/hardware/mISDN/mISDNisar.c skb_trim(ch->bch.rx_skb, 0); bch 465 drivers/isdn/hardware/mISDN/mISDNisar.c skb_trim(ch->bch.rx_skb, 0); bch 466 drivers/isdn/hardware/mISDN/mISDNisar.c ptr = skb_put(ch->bch.rx_skb, ch->is->clsb); bch 469 drivers/isdn/hardware/mISDN/mISDNisar.c if (ch->bch.rx_skb->len < 3) { /* last 2 are the FCS */ bch 471 drivers/isdn/hardware/mISDN/mISDNisar.c ch->is->name, ch->bch.rx_skb->len); bch 472 drivers/isdn/hardware/mISDN/mISDNisar.c skb_trim(ch->bch.rx_skb, 0); bch 475 drivers/isdn/hardware/mISDN/mISDNisar.c skb_trim(ch->bch.rx_skb, ch->bch.rx_skb->len - 2); bch 476 drivers/isdn/hardware/mISDN/mISDNisar.c recv_Bchannel(&ch->bch, 0, false); bch 484 drivers/isdn/hardware/mISDN/mISDNisar.c if (ch->bch.rx_skb) bch 485 drivers/isdn/hardware/mISDN/mISDNisar.c skb_trim(ch->bch.rx_skb, 0); bch 488 drivers/isdn/hardware/mISDN/mISDNisar.c if (!ch->bch.rx_skb) { bch 489 drivers/isdn/hardware/mISDN/mISDNisar.c ch->bch.rx_skb = mI_alloc_skb(ch->bch.maxlen, bch 491 drivers/isdn/hardware/mISDN/mISDNisar.c if (unlikely(!ch->bch.rx_skb)) { bch 499 drivers/isdn/hardware/mISDN/mISDNisar.c rcv_mbox(ch->is, skb_put(ch->bch.rx_skb, ch->is->clsb)); bch 501 drivers/isdn/hardware/mISDN/mISDNisar.c ch->is->name, ch->bch.rx_skb->len); bch 512 drivers/isdn/hardware/mISDN/mISDNisar.c recv_Bchannel(&ch->bch, 0, false); bch 521 drivers/isdn/hardware/mISDN/mISDNisar.c if (ch->bch.rx_skb) bch 522 drivers/isdn/hardware/mISDN/mISDNisar.c skb_trim(ch->bch.rx_skb, 0); bch 526 drivers/isdn/hardware/mISDN/mISDNisar.c if ((ch->bch.rx_skb->len + ch->is->clsb) > bch 527 drivers/isdn/hardware/mISDN/mISDNisar.c (ch->bch.maxlen + 2)) { bch 531 drivers/isdn/hardware/mISDN/mISDNisar.c skb_trim(ch->bch.rx_skb, 0); bch 536 drivers/isdn/hardware/mISDN/mISDNisar.c skb_trim(ch->bch.rx_skb, 0); bch 541 drivers/isdn/hardware/mISDN/mISDNisar.c skb_trim(ch->bch.rx_skb, 0); bch 542 drivers/isdn/hardware/mISDN/mISDNisar.c ptr = skb_put(ch->bch.rx_skb, ch->is->clsb); bch 545 drivers/isdn/hardware/mISDN/mISDNisar.c if (ch->bch.rx_skb->len < 3) { /* last 2 are the FCS */ bch 547 drivers/isdn/hardware/mISDN/mISDNisar.c ch->is->name, ch->bch.rx_skb->len); bch 548 drivers/isdn/hardware/mISDN/mISDNisar.c skb_trim(ch->bch.rx_skb, 0); bch 551 drivers/isdn/hardware/mISDN/mISDNisar.c skb_trim(ch->bch.rx_skb, ch->bch.rx_skb->len - 2); bch 552 drivers/isdn/hardware/mISDN/mISDNisar.c recv_Bchannel(&ch->bch, 0, false); bch 558 drivers/isdn/hardware/mISDN/mISDNisar.c if (ch->bch.rx_skb) bch 559 drivers/isdn/hardware/mISDN/mISDNisar.c skb_trim(ch->bch.rx_skb, 0); bch 567 drivers/isdn/hardware/mISDN/mISDNisar.c pr_info("isar_rcv_frame protocol (%x)error\n", ch->bch.state); bch 580 drivers/isdn/hardware/mISDN/mISDNisar.c pr_debug("%s: ch%d tx_skb %d tx_idx %d\n", ch->is->name, ch->bch.nr, bch 581 drivers/isdn/hardware/mISDN/mISDNisar.c ch->bch.tx_skb ? ch->bch.tx_skb->len : -1, ch->bch.tx_idx); bch 585 drivers/isdn/hardware/mISDN/mISDNisar.c if (!ch->bch.tx_skb) { bch 586 drivers/isdn/hardware/mISDN/mISDNisar.c if (!test_bit(FLG_TX_EMPTY, &ch->bch.Flags) || bch 587 drivers/isdn/hardware/mISDN/mISDNisar.c (ch->bch.state != ISDN_P_B_RAW)) bch 591 drivers/isdn/hardware/mISDN/mISDNisar.c memset(ch->is->buf, ch->bch.fill[0], count); bch 596 drivers/isdn/hardware/mISDN/mISDNisar.c count = ch->bch.tx_skb->len - ch->bch.tx_idx; bch 605 drivers/isdn/hardware/mISDN/mISDNisar.c ptr = ch->bch.tx_skb->data + ch->bch.tx_idx; bch 606 drivers/isdn/hardware/mISDN/mISDNisar.c if (!ch->bch.tx_idx) { bch 608 drivers/isdn/hardware/mISDN/mISDNisar.c if ((ch->bch.state == ISDN_P_B_T30_FAX) && bch 614 drivers/isdn/hardware/mISDN/mISDNisar.c &ch->bch.Flags); bch 619 drivers/isdn/hardware/mISDN/mISDNisar.c &ch->bch.Flags); bch 625 drivers/isdn/hardware/mISDN/mISDNisar.c ch->bch.tx_idx += count; bch 626 drivers/isdn/hardware/mISDN/mISDNisar.c switch (ch->bch.state) { bch 654 drivers/isdn/hardware/mISDN/mISDNisar.c __func__, ch->bch.state); bch 678 drivers/isdn/hardware/mISDN/mISDNisar.c ch->bch.nr, ch->bch.tx_skb ? ch->bch.tx_skb->len : -1, bch 679 drivers/isdn/hardware/mISDN/mISDNisar.c ch->bch.tx_idx); bch 680 drivers/isdn/hardware/mISDN/mISDNisar.c if (ch->bch.state == ISDN_P_B_T30_FAX) { bch 682 drivers/isdn/hardware/mISDN/mISDNisar.c if (test_bit(FLG_LASTDATA, &ch->bch.Flags)) { bch 684 drivers/isdn/hardware/mISDN/mISDNisar.c test_and_set_bit(FLG_NMD_DATA, &ch->bch.Flags); bch 687 drivers/isdn/hardware/mISDN/mISDNisar.c if (test_bit(FLG_DLEETX, &ch->bch.Flags)) { bch 688 drivers/isdn/hardware/mISDN/mISDNisar.c test_and_set_bit(FLG_LASTDATA, &ch->bch.Flags); bch 689 drivers/isdn/hardware/mISDN/mISDNisar.c test_and_set_bit(FLG_NMD_DATA, &ch->bch.Flags); bch 693 drivers/isdn/hardware/mISDN/mISDNisar.c dev_kfree_skb(ch->bch.tx_skb); bch 694 drivers/isdn/hardware/mISDN/mISDNisar.c if (get_next_bframe(&ch->bch)) { bch 696 drivers/isdn/hardware/mISDN/mISDNisar.c test_and_clear_bit(FLG_TX_EMPTY, &ch->bch.Flags); bch 697 drivers/isdn/hardware/mISDN/mISDNisar.c } else if (test_bit(FLG_TX_EMPTY, &ch->bch.Flags)) { bch 700 drivers/isdn/hardware/mISDN/mISDNisar.c if (test_and_clear_bit(FLG_DLEETX, &ch->bch.Flags)) { bch 702 drivers/isdn/hardware/mISDN/mISDNisar.c &ch->bch.Flags)) { bch 704 drivers/isdn/hardware/mISDN/mISDNisar.c &ch->bch.Flags)) { bch 709 drivers/isdn/hardware/mISDN/mISDNisar.c test_and_set_bit(FLG_LL_OK, &ch->bch.Flags); bch 713 drivers/isdn/hardware/mISDN/mISDNisar.c } else if (test_bit(FLG_FILLEMPTY, &ch->bch.Flags)) { bch 714 drivers/isdn/hardware/mISDN/mISDNisar.c test_and_set_bit(FLG_TX_EMPTY, &ch->bch.Flags); bch 727 drivers/isdn/hardware/mISDN/mISDNisar.c if (ch && test_bit(FLG_ACTIVE, &ch->bch.Flags)) { bch 728 drivers/isdn/hardware/mISDN/mISDNisar.c if (ch->bch.tx_skb && (ch->bch.tx_skb->len > bch 729 drivers/isdn/hardware/mISDN/mISDNisar.c ch->bch.tx_idx)) bch 737 drivers/isdn/hardware/mISDN/mISDNisar.c if (ch && test_bit(FLG_ACTIVE, &ch->bch.Flags)) { bch 738 drivers/isdn/hardware/mISDN/mISDNisar.c if (ch->bch.tx_skb && (ch->bch.tx_skb->len > bch 739 drivers/isdn/hardware/mISDN/mISDNisar.c ch->bch.tx_idx)) bch 872 drivers/isdn/hardware/mISDN/mISDNisar.c if (test_bit(BC_FLG_ORIG, &ch->bch.Flags)) bch 873 drivers/isdn/hardware/mISDN/mISDNisar.c isar_pump_cmd(bch, HW_MOD_FRH, 3); bch 875 drivers/isdn/hardware/mISDN/mISDNisar.c isar_pump_cmd(bch, HW_MOD_FTH, 3); bch 932 drivers/isdn/hardware/mISDN/mISDNisar.c &ch->bch.Flags)) bch 937 drivers/isdn/hardware/mISDN/mISDNisar.c &ch->bch.Flags); bch 985 drivers/isdn/hardware/mISDN/mISDNisar.c if (test_and_clear_bit(FLG_LL_OK, &ch->bch.Flags)) bch 1064 drivers/isdn/hardware/mISDN/mISDNisar.c ch->bch.err_tx++; bch 1066 drivers/isdn/hardware/mISDN/mISDNisar.c ch->bch.err_rdo++; bch 1077 drivers/isdn/hardware/mISDN/mISDNisar.c if (ch->bch.state == ISDN_P_B_MODEM_ASYNC) bch 1079 drivers/isdn/hardware/mISDN/mISDNisar.c else if (ch->bch.state == ISDN_P_B_T30_FAX) bch 1081 drivers/isdn/hardware/mISDN/mISDNisar.c else if (ch->bch.state == ISDN_P_B_RAW) { bch 1091 drivers/isdn/hardware/mISDN/mISDNisar.c _queue_data(&ch->bch.ch, PH_CONTROL_IND, bch 1096 drivers/isdn/hardware/mISDN/mISDNisar.c isar->name, ch->bch.state, bch 1140 drivers/isdn/hardware/mISDN/mISDNisar.c pr_debug("%s: ftimer flags %lx\n", ch->is->name, ch->bch.Flags); bch 1141 drivers/isdn/hardware/mISDN/mISDNisar.c test_and_clear_bit(FLG_FTI_RUN, &ch->bch.Flags); bch 1142 drivers/isdn/hardware/mISDN/mISDNisar.c if (test_and_clear_bit(FLG_LL_CONN, &ch->bch.Flags)) bch 1151 drivers/isdn/hardware/mISDN/mISDNisar.c switch (ch->bch.state) { bch 1158 drivers/isdn/hardware/mISDN/mISDNisar.c if (test_bit(FLG_DTMFSEND, &ch->bch.Flags)) { bch 1170 drivers/isdn/hardware/mISDN/mISDNisar.c if (test_bit(FLG_ORIGIN, &ch->bch.Flags)) { bch 1186 drivers/isdn/hardware/mISDN/mISDNisar.c if (test_bit(FLG_ORIGIN, &ch->bch.Flags)) { bch 1197 drivers/isdn/hardware/mISDN/mISDNisar.c test_and_set_bit(FLG_FTI_RUN, &ch->bch.Flags); bch 1210 drivers/isdn/hardware/mISDN/mISDNisar.c switch (ch->bch.state) { bch 1242 drivers/isdn/hardware/mISDN/mISDNisar.c if (ch->bch.nr == 2) { bch 1246 drivers/isdn/hardware/mISDN/mISDNisar.c switch (ch->bch.state) { bch 1261 drivers/isdn/hardware/mISDN/mISDNisar.c if (test_bit(FLG_DTMFSEND, &ch->bch.Flags)) bch 1276 drivers/isdn/hardware/mISDN/mISDNisar.c if (ch->bch.state == ISDN_P_NONE) { /* New Setup */ bch 1282 drivers/isdn/hardware/mISDN/mISDNisar.c test_and_clear_bit(FLG_HDLC, &ch->bch.Flags); bch 1283 drivers/isdn/hardware/mISDN/mISDNisar.c test_and_clear_bit(FLG_TRANSPARENT, &ch->bch.Flags); bch 1298 drivers/isdn/hardware/mISDN/mISDNisar.c test_and_set_bit(FLG_HDLC, &ch->bch.Flags); bch 1301 drivers/isdn/hardware/mISDN/mISDNisar.c &ch->bch.Flags); bch 1322 drivers/isdn/hardware/mISDN/mISDNisar.c ch->bch.nr, ch->dpath, ch->bch.state, bprotocol); bch 1323 drivers/isdn/hardware/mISDN/mISDNisar.c ch->bch.state = bprotocol; bch 1327 drivers/isdn/hardware/mISDN/mISDNisar.c if (ch->bch.state == ISDN_P_NONE) { bch 1334 drivers/isdn/hardware/mISDN/mISDNisar.c ch->is->ctrl(ch->is->hw, HW_DEACT_IND, ch->bch.nr); bch 1336 drivers/isdn/hardware/mISDN/mISDNisar.c ch->is->ctrl(ch->is->hw, HW_ACTIVATE_IND, ch->bch.nr); bch 1347 drivers/isdn/hardware/mISDN/mISDNisar.c ch->is->name, cmd, para, ch->bch.state); bch 1460 drivers/isdn/hardware/mISDN/mISDNisar.c isar->ch[i].bch.state = 0; bch 1469 drivers/isdn/hardware/mISDN/mISDNisar.c struct bchannel *bch = container_of(ch, struct bchannel, ch); bch 1470 drivers/isdn/hardware/mISDN/mISDNisar.c struct isar_ch *ich = container_of(bch, struct isar_ch, bch); bch 1479 drivers/isdn/hardware/mISDN/mISDNisar.c ret = bchannel_senddata(bch, skb); bch 1488 drivers/isdn/hardware/mISDN/mISDNisar.c if (!test_and_set_bit(FLG_ACTIVE, &bch->Flags)) bch 1499 drivers/isdn/hardware/mISDN/mISDNisar.c mISDN_clear_bchannel(bch); bch 1512 drivers/isdn/hardware/mISDN/mISDNisar.c if (bch->state == ISDN_P_B_L2DTMF) { bch 1527 drivers/isdn/hardware/mISDN/mISDNisar.c __func__, bch->state); bch 1536 drivers/isdn/hardware/mISDN/mISDNisar.c test_bit(FLG_INITIALIZED, &bch->Flags)) { bch 1546 drivers/isdn/hardware/mISDN/mISDNisar.c test_and_set_bit(FLG_DLEETX, &bch->Flags); bch 1564 drivers/isdn/hardware/mISDN/mISDNisar.c channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq) bch 1566 drivers/isdn/hardware/mISDN/mISDNisar.c return mISDN_ctrl_bchannel(bch, cq); bch 1572 drivers/isdn/hardware/mISDN/mISDNisar.c struct bchannel *bch = container_of(ch, struct bchannel, ch); bch 1573 drivers/isdn/hardware/mISDN/mISDNisar.c struct isar_ch *ich = container_of(bch, struct isar_ch, bch); bch 1580 drivers/isdn/hardware/mISDN/mISDNisar.c test_and_clear_bit(FLG_OPEN, &bch->Flags); bch 1581 drivers/isdn/hardware/mISDN/mISDNisar.c cancel_work_sync(&bch->workq); bch 1583 drivers/isdn/hardware/mISDN/mISDNisar.c mISDN_clear_bchannel(bch); bch 1592 drivers/isdn/hardware/mISDN/mISDNisar.c ret = channel_bctrl(bch, arg); bch 1608 drivers/isdn/hardware/mISDN/mISDNisar.c test_and_clear_bit(FLG_INITIALIZED, &isar->ch[0].bch.Flags); bch 1609 drivers/isdn/hardware/mISDN/mISDNisar.c test_and_clear_bit(FLG_INITIALIZED, &isar->ch[1].bch.Flags); bch 1619 drivers/isdn/hardware/mISDN/mISDNisar.c if (isar->ch[0].bch.debug & DEBUG_HW) bch 1629 drivers/isdn/hardware/mISDN/mISDNisar.c test_and_set_bit(FLG_INITIALIZED, &isar->ch[0].bch.Flags); bch 1631 drivers/isdn/hardware/mISDN/mISDNisar.c test_and_set_bit(FLG_INITIALIZED, &isar->ch[1].bch.Flags); bch 1638 drivers/isdn/hardware/mISDN/mISDNisar.c struct bchannel *bch; bch 1644 drivers/isdn/hardware/mISDN/mISDNisar.c bch = &isar->ch[rq->adr.channel - 1].bch; bch 1645 drivers/isdn/hardware/mISDN/mISDNisar.c if (test_and_set_bit(FLG_OPEN, &bch->Flags)) bch 1647 drivers/isdn/hardware/mISDN/mISDNisar.c bch->ch.protocol = rq->protocol; bch 1648 drivers/isdn/hardware/mISDN/mISDNisar.c rq->ch = &bch->ch; bch 1659 drivers/isdn/hardware/mISDN/mISDNisar.c isar->ch[i].bch.nr = i + 1; bch 1660 drivers/isdn/hardware/mISDN/mISDNisar.c mISDN_initbchannel(&isar->ch[i].bch, MAX_DATA_MEM, 32); bch 1661 drivers/isdn/hardware/mISDN/mISDNisar.c isar->ch[i].bch.ch.nr = i + 1; bch 1662 drivers/isdn/hardware/mISDN/mISDNisar.c isar->ch[i].bch.ch.send = &isar_l2l1; bch 1663 drivers/isdn/hardware/mISDN/mISDNisar.c isar->ch[i].bch.ch.ctrl = isar_bctrl; bch 1664 drivers/isdn/hardware/mISDN/mISDNisar.c isar->ch[i].bch.hw = hw; bch 42 drivers/isdn/hardware/mISDN/netjet.c struct bchannel bch; bch 96 drivers/isdn/hardware/mISDN/netjet.c card->bc[0].bch.debug = debug; bch 97 drivers/isdn/hardware/mISDN/netjet.c card->bc[1].bch.debug = debug; bch 177 drivers/isdn/hardware/mISDN/netjet.c struct tiger_hw *card = bc->bch.hw; bch 181 drivers/isdn/hardware/mISDN/netjet.c bc->bch.nr, fill, cnt, idx, card->send.idx); bch 182 drivers/isdn/hardware/mISDN/netjet.c if (bc->bch.nr & 2) { bch 200 drivers/isdn/hardware/mISDN/netjet.c struct tiger_hw *card = bc->bch.hw; bch 203 drivers/isdn/hardware/mISDN/netjet.c bc->bch.nr, bc->bch.state, protocol); bch 206 drivers/isdn/hardware/mISDN/netjet.c if (bc->bch.state == ISDN_P_NONE) bch 209 drivers/isdn/hardware/mISDN/netjet.c bc->bch.state = protocol; bch 211 drivers/isdn/hardware/mISDN/netjet.c if ((card->bc[0].bch.state == ISDN_P_NONE) && bch 212 drivers/isdn/hardware/mISDN/netjet.c (card->bc[1].bch.state == ISDN_P_NONE)) { bch 217 drivers/isdn/hardware/mISDN/netjet.c test_and_clear_bit(FLG_HDLC, &bc->bch.Flags); bch 218 drivers/isdn/hardware/mISDN/netjet.c test_and_clear_bit(FLG_TRANSPARENT, &bc->bch.Flags); bch 224 drivers/isdn/hardware/mISDN/netjet.c test_and_set_bit(FLG_TRANSPARENT, &bc->bch.Flags); bch 225 drivers/isdn/hardware/mISDN/netjet.c bc->bch.state = protocol; bch 238 drivers/isdn/hardware/mISDN/netjet.c test_and_set_bit(FLG_HDLC, &bc->bch.Flags); bch 239 drivers/isdn/hardware/mISDN/netjet.c bc->bch.state = protocol; bch 365 drivers/isdn/hardware/mISDN/netjet.c struct tiger_hw *card = bc->bch.hw; bch 373 drivers/isdn/hardware/mISDN/netjet.c bc->bch.nr, idx); bch 376 drivers/isdn/hardware/mISDN/netjet.c if (test_bit(FLG_RX_OFF, &bc->bch.Flags)) { bch 377 drivers/isdn/hardware/mISDN/netjet.c bc->bch.dropcnt += cnt; bch 380 drivers/isdn/hardware/mISDN/netjet.c stat = bchannel_get_rxbuf(&bc->bch, cnt); bch 384 drivers/isdn/hardware/mISDN/netjet.c card->name, bc->bch.nr, cnt); bch 387 drivers/isdn/hardware/mISDN/netjet.c if (test_bit(FLG_TRANSPARENT, &bc->bch.Flags)) bch 388 drivers/isdn/hardware/mISDN/netjet.c p = skb_put(bc->bch.rx_skb, cnt); bch 394 drivers/isdn/hardware/mISDN/netjet.c if (bc->bch.nr & 2) bch 401 drivers/isdn/hardware/mISDN/netjet.c if (test_bit(FLG_TRANSPARENT, &bc->bch.Flags)) { bch 402 drivers/isdn/hardware/mISDN/netjet.c recv_Bchannel(&bc->bch, 0, false); bch 409 drivers/isdn/hardware/mISDN/netjet.c bc->bch.rx_skb->data, bc->bch.maxlen); bch 411 drivers/isdn/hardware/mISDN/netjet.c p = skb_put(bc->bch.rx_skb, stat); bch 414 drivers/isdn/hardware/mISDN/netjet.c "B%1d-recv %s %d ", bc->bch.nr, bch 420 drivers/isdn/hardware/mISDN/netjet.c recv_Bchannel(&bc->bch, 0, false); bch 421 drivers/isdn/hardware/mISDN/netjet.c stat = bchannel_get_rxbuf(&bc->bch, bc->bch.maxlen); bch 424 drivers/isdn/hardware/mISDN/netjet.c card->name, bc->bch.nr, cnt); bch 429 drivers/isdn/hardware/mISDN/netjet.c card->name, bc->bch.nr); bch 432 drivers/isdn/hardware/mISDN/netjet.c card->name, bc->bch.nr); bch 435 drivers/isdn/hardware/mISDN/netjet.c card->name, bc->bch.nr, bc->bch.maxlen); bch 457 drivers/isdn/hardware/mISDN/netjet.c if (test_bit(FLG_ACTIVE, &card->bc[0].bch.Flags)) bch 459 drivers/isdn/hardware/mISDN/netjet.c if (test_bit(FLG_ACTIVE, &card->bc[1].bch.Flags)) bch 481 drivers/isdn/hardware/mISDN/netjet.c __func__, bc->bch.nr, bc->free, bc->idx, card->send.idx); bch 489 drivers/isdn/hardware/mISDN/netjet.c struct tiger_hw *card = bc->bch.hw; bch 497 drivers/isdn/hardware/mISDN/netjet.c __func__, bc->bch.nr, bc->free, bc->txstate, bch 504 drivers/isdn/hardware/mISDN/netjet.c bc->bch.nr, count); bch 507 drivers/isdn/hardware/mISDN/netjet.c m = (bc->bch.nr & 1) ? 0xffffff00 : 0xffff00ff; bch 513 drivers/isdn/hardware/mISDN/netjet.c v |= (bc->bch.nr & 1) ? (u32)(p[i]) : ((u32)(p[i])) << 8; bch 518 drivers/isdn/hardware/mISDN/netjet.c bc->bch.nr, card->name, count); bch 526 drivers/isdn/hardware/mISDN/netjet.c struct tiger_hw *card = bc->bch.hw; bch 533 drivers/isdn/hardware/mISDN/netjet.c if (!bc->bch.tx_skb) { bch 534 drivers/isdn/hardware/mISDN/netjet.c if (!test_bit(FLG_TX_EMPTY, &bc->bch.Flags)) bch 538 drivers/isdn/hardware/mISDN/netjet.c p = bc->bch.fill; bch 540 drivers/isdn/hardware/mISDN/netjet.c count = bc->bch.tx_skb->len - bc->bch.tx_idx; bch 544 drivers/isdn/hardware/mISDN/netjet.c card->name, __func__, bc->bch.nr, count, bc->free, bch 545 drivers/isdn/hardware/mISDN/netjet.c bc->bch.tx_idx, bc->bch.tx_skb->len, bc->txstate, bch 547 drivers/isdn/hardware/mISDN/netjet.c p = bc->bch.tx_skb->data + bc->bch.tx_idx; bch 551 drivers/isdn/hardware/mISDN/netjet.c if (test_bit(FLG_HDLC, &bc->bch.Flags) && !fillempty) { bch 555 drivers/isdn/hardware/mISDN/netjet.c bc->bch.nr, i, count); bch 556 drivers/isdn/hardware/mISDN/netjet.c bc->bch.tx_idx += i; bch 563 drivers/isdn/hardware/mISDN/netjet.c bc->bch.tx_idx += count; bch 566 drivers/isdn/hardware/mISDN/netjet.c m = (bc->bch.nr & 1) ? 0xffffff00 : 0xffff00ff; bch 569 drivers/isdn/hardware/mISDN/netjet.c if (!(bc->bch.nr & 1)) bch 586 drivers/isdn/hardware/mISDN/netjet.c v |= (bc->bch.nr & 1) ? n : n << 8; bch 592 drivers/isdn/hardware/mISDN/netjet.c bc->bch.nr, card->name, count); bch 605 drivers/isdn/hardware/mISDN/netjet.c if (bc->bch.tx_skb && bc->bch.tx_idx < bc->bch.tx_skb->len) { bch 608 drivers/isdn/hardware/mISDN/netjet.c dev_kfree_skb(bc->bch.tx_skb); bch 609 drivers/isdn/hardware/mISDN/netjet.c if (get_next_bframe(&bc->bch)) { bch 611 drivers/isdn/hardware/mISDN/netjet.c test_and_clear_bit(FLG_TX_EMPTY, &bc->bch.Flags); bch 612 drivers/isdn/hardware/mISDN/netjet.c } else if (test_bit(FLG_TX_EMPTY, &bc->bch.Flags)) { bch 614 drivers/isdn/hardware/mISDN/netjet.c } else if (test_bit(FLG_FILLEMPTY, &bc->bch.Flags)) { bch 615 drivers/isdn/hardware/mISDN/netjet.c test_and_set_bit(FLG_TX_EMPTY, &bc->bch.Flags); bch 633 drivers/isdn/hardware/mISDN/netjet.c bc->bch.nr, bc->txstate); bch 640 drivers/isdn/hardware/mISDN/netjet.c if (test_bit(FLG_HDLC, &bc->bch.Flags)) { bch 645 drivers/isdn/hardware/mISDN/netjet.c bc->bch.nr, bc->free, bc->idx, card->send.idx); bch 669 drivers/isdn/hardware/mISDN/netjet.c if (test_bit(FLG_ACTIVE, &card->bc[i].bch.Flags)) bch 740 drivers/isdn/hardware/mISDN/netjet.c struct bchannel *bch = container_of(ch, struct bchannel, ch); bch 741 drivers/isdn/hardware/mISDN/netjet.c struct tiger_ch *bc = container_of(bch, struct tiger_ch, bch); bch 742 drivers/isdn/hardware/mISDN/netjet.c struct tiger_hw *card = bch->hw; bch 749 drivers/isdn/hardware/mISDN/netjet.c ret = bchannel_senddata(bch, skb); bch 758 drivers/isdn/hardware/mISDN/netjet.c if (!test_and_set_bit(FLG_ACTIVE, &bch->Flags)) bch 769 drivers/isdn/hardware/mISDN/netjet.c mISDN_clear_bchannel(bch); bch 785 drivers/isdn/hardware/mISDN/netjet.c return mISDN_ctrl_bchannel(&bc->bch, cq); bch 791 drivers/isdn/hardware/mISDN/netjet.c struct bchannel *bch = container_of(ch, struct bchannel, ch); bch 792 drivers/isdn/hardware/mISDN/netjet.c struct tiger_ch *bc = container_of(bch, struct tiger_ch, bch); bch 793 drivers/isdn/hardware/mISDN/netjet.c struct tiger_hw *card = bch->hw; bch 800 drivers/isdn/hardware/mISDN/netjet.c test_and_clear_bit(FLG_OPEN, &bch->Flags); bch 801 drivers/isdn/hardware/mISDN/netjet.c cancel_work_sync(&bch->workq); bch 803 drivers/isdn/hardware/mISDN/netjet.c mISDN_clear_bchannel(bch); bch 851 drivers/isdn/hardware/mISDN/netjet.c struct bchannel *bch; bch 857 drivers/isdn/hardware/mISDN/netjet.c bch = &card->bc[rq->adr.channel - 1].bch; bch 858 drivers/isdn/hardware/mISDN/netjet.c if (test_and_set_bit(FLG_OPEN, &bch->Flags)) bch 860 drivers/isdn/hardware/mISDN/netjet.c test_and_clear_bit(FLG_FILLEMPTY, &bch->Flags); bch 861 drivers/isdn/hardware/mISDN/netjet.c bch->ch.protocol = rq->protocol; bch 862 drivers/isdn/hardware/mISDN/netjet.c rq->ch = &bch->ch; bch 963 drivers/isdn/hardware/mISDN/netjet.c mISDN_freebchannel(&card->bc[i].bch); bch 1018 drivers/isdn/hardware/mISDN/netjet.c card->bc[i].bch.nr = i + 1; bch 1020 drivers/isdn/hardware/mISDN/netjet.c mISDN_initbchannel(&card->bc[i].bch, MAX_DATA_MEM, bch 1022 drivers/isdn/hardware/mISDN/netjet.c card->bc[i].bch.hw = card; bch 1023 drivers/isdn/hardware/mISDN/netjet.c card->bc[i].bch.ch.send = nj_l2l1B; bch 1024 drivers/isdn/hardware/mISDN/netjet.c card->bc[i].bch.ch.ctrl = nj_bctrl; bch 1025 drivers/isdn/hardware/mISDN/netjet.c card->bc[i].bch.ch.nr = i + 1; bch 1026 drivers/isdn/hardware/mISDN/netjet.c list_add(&card->bc[i].bch.ch.list, bch 1028 drivers/isdn/hardware/mISDN/netjet.c card->bc[i].bch.hw = card; bch 79 drivers/isdn/hardware/mISDN/speedfax.c card->isar.ch[0].bch.debug = debug; bch 80 drivers/isdn/hardware/mISDN/speedfax.c card->isar.ch[1].bch.debug = debug; bch 398 drivers/isdn/hardware/mISDN/speedfax.c list_add(&card->isar.ch[i].bch.ch.list, bch 45 drivers/isdn/hardware/mISDN/w6692.c struct bchannel bch; bch 83 drivers/isdn/hardware/mISDN/w6692.c card->bc[0].bch.debug = debug; bch 84 drivers/isdn/hardware/mISDN/w6692.c card->bc[1].bch.debug = debug; bch 447 drivers/isdn/hardware/mISDN/w6692.c struct w6692_hw *card = wch->bch.hw; bch 452 drivers/isdn/hardware/mISDN/w6692.c if (unlikely(wch->bch.state == ISDN_P_NONE)) { bch 455 drivers/isdn/hardware/mISDN/w6692.c if (wch->bch.rx_skb) bch 456 drivers/isdn/hardware/mISDN/w6692.c skb_trim(wch->bch.rx_skb, 0); bch 459 drivers/isdn/hardware/mISDN/w6692.c if (test_bit(FLG_RX_OFF, &wch->bch.Flags)) { bch 460 drivers/isdn/hardware/mISDN/w6692.c wch->bch.dropcnt += count; bch 464 drivers/isdn/hardware/mISDN/w6692.c maxlen = bchannel_get_rxbuf(&wch->bch, count); bch 467 drivers/isdn/hardware/mISDN/w6692.c if (wch->bch.rx_skb) bch 468 drivers/isdn/hardware/mISDN/w6692.c skb_trim(wch->bch.rx_skb, 0); bch 470 drivers/isdn/hardware/mISDN/w6692.c card->name, wch->bch.nr, count); bch 473 drivers/isdn/hardware/mISDN/w6692.c ptr = skb_put(wch->bch.rx_skb, count); bch 478 drivers/isdn/hardware/mISDN/w6692.c wch->bch.nr, card->name, count); bch 486 drivers/isdn/hardware/mISDN/w6692.c struct w6692_hw *card = wch->bch.hw; bch 491 drivers/isdn/hardware/mISDN/w6692.c if (!wch->bch.tx_skb) { bch 492 drivers/isdn/hardware/mISDN/w6692.c if (!test_bit(FLG_TX_EMPTY, &wch->bch.Flags)) bch 494 drivers/isdn/hardware/mISDN/w6692.c ptr = wch->bch.fill; bch 498 drivers/isdn/hardware/mISDN/w6692.c count = wch->bch.tx_skb->len - wch->bch.tx_idx; bch 501 drivers/isdn/hardware/mISDN/w6692.c ptr = wch->bch.tx_skb->data + wch->bch.tx_idx; bch 505 drivers/isdn/hardware/mISDN/w6692.c else if (test_bit(FLG_HDLC, &wch->bch.Flags)) bch 509 drivers/isdn/hardware/mISDN/w6692.c count, wch->bch.tx_idx); bch 510 drivers/isdn/hardware/mISDN/w6692.c wch->bch.tx_idx += count; bch 522 drivers/isdn/hardware/mISDN/w6692.c wch->bch.nr, card->name, count); bch 531 drivers/isdn/hardware/mISDN/w6692.c struct w6692_hw *card = wch->bch.hw; bch 536 drivers/isdn/hardware/mISDN/w6692.c !test_bit(FLG_TRANSPARENT, &wch->bch.Flags)) bch 558 drivers/isdn/hardware/mISDN/w6692.c struct w6692_hw *card = wch->bch.hw; bch 561 drivers/isdn/hardware/mISDN/w6692.c !test_bit(FLG_TRANSPARENT, &wch->bch.Flags)) bch 566 drivers/isdn/hardware/mISDN/w6692.c card->pctl |= ((wch->bch.nr & 2) ? W_PCTL_PCX : 0); bch 575 drivers/isdn/hardware/mISDN/w6692.c struct w6692_hw *card = wch->bch.hw; bch 591 drivers/isdn/hardware/mISDN/w6692.c card = wch->bch.hw; bch 593 drivers/isdn/hardware/mISDN/w6692.c wch->bch.nr, wch->bch.state, pr); bch 599 drivers/isdn/hardware/mISDN/w6692.c mISDN_clear_bchannel(&wch->bch); bch 602 drivers/isdn/hardware/mISDN/w6692.c test_and_clear_bit(FLG_HDLC, &wch->bch.Flags); bch 603 drivers/isdn/hardware/mISDN/w6692.c test_and_clear_bit(FLG_TRANSPARENT, &wch->bch.Flags); bch 611 drivers/isdn/hardware/mISDN/w6692.c test_and_set_bit(FLG_TRANSPARENT, &wch->bch.Flags); bch 621 drivers/isdn/hardware/mISDN/w6692.c test_and_set_bit(FLG_HDLC, &wch->bch.Flags); bch 627 drivers/isdn/hardware/mISDN/w6692.c wch->bch.state = pr; bch 634 drivers/isdn/hardware/mISDN/w6692.c if (wch->bch.tx_skb && wch->bch.tx_idx < wch->bch.tx_skb->len) { bch 637 drivers/isdn/hardware/mISDN/w6692.c dev_kfree_skb(wch->bch.tx_skb); bch 638 drivers/isdn/hardware/mISDN/w6692.c if (get_next_bframe(&wch->bch)) { bch 640 drivers/isdn/hardware/mISDN/w6692.c test_and_clear_bit(FLG_TX_EMPTY, &wch->bch.Flags); bch 641 drivers/isdn/hardware/mISDN/w6692.c } else if (test_bit(FLG_TX_EMPTY, &wch->bch.Flags)) { bch 655 drivers/isdn/hardware/mISDN/w6692.c pr_debug("%s: B%d EXIR %02x\n", card->name, wch->bch.nr, stat); bch 660 drivers/isdn/hardware/mISDN/w6692.c test_bit(FLG_ACTIVE, &wch->bch.Flags)) { bch 662 drivers/isdn/hardware/mISDN/w6692.c wch->bch.nr, wch->bch.state); bch 664 drivers/isdn/hardware/mISDN/w6692.c wch->bch.err_rdo++; bch 667 drivers/isdn/hardware/mISDN/w6692.c if (test_bit(FLG_HDLC, &wch->bch.Flags)) { bch 670 drivers/isdn/hardware/mISDN/w6692.c card->name, wch->bch.nr); bch 672 drivers/isdn/hardware/mISDN/w6692.c wch->bch.err_crc++; bch 677 drivers/isdn/hardware/mISDN/w6692.c card->name, wch->bch.nr); bch 679 drivers/isdn/hardware/mISDN/w6692.c wch->bch.err_inv++; bch 685 drivers/isdn/hardware/mISDN/w6692.c if (wch->bch.rx_skb) bch 686 drivers/isdn/hardware/mISDN/w6692.c skb_trim(wch->bch.rx_skb, 0); bch 693 drivers/isdn/hardware/mISDN/w6692.c recv_Bchannel(&wch->bch, 0, false); bch 701 drivers/isdn/hardware/mISDN/w6692.c wch->bch.nr, wch->bch.state); bch 703 drivers/isdn/hardware/mISDN/w6692.c wch->bch.err_rdo++; bch 709 drivers/isdn/hardware/mISDN/w6692.c if (test_bit(FLG_TRANSPARENT, &wch->bch.Flags)) bch 710 drivers/isdn/hardware/mISDN/w6692.c recv_Bchannel(&wch->bch, 0, false); bch 717 drivers/isdn/hardware/mISDN/w6692.c wch->bch.nr, wch->bch.state); bch 719 drivers/isdn/hardware/mISDN/w6692.c wch->bch.err_rdo++; bch 729 drivers/isdn/hardware/mISDN/w6692.c wch->bch.nr, star); bch 733 drivers/isdn/hardware/mISDN/w6692.c wch->bch.nr, wch->bch.state); bch 735 drivers/isdn/hardware/mISDN/w6692.c wch->bch.err_xdu++; bch 740 drivers/isdn/hardware/mISDN/w6692.c if (wch->bch.tx_skb) { bch 741 drivers/isdn/hardware/mISDN/w6692.c if (!test_bit(FLG_TRANSPARENT, &wch->bch.Flags)) bch 742 drivers/isdn/hardware/mISDN/w6692.c wch->bch.tx_idx = 0; bch 751 drivers/isdn/hardware/mISDN/w6692.c wch->bch.nr, wch->bch.state); bch 753 drivers/isdn/hardware/mISDN/w6692.c wch->bch.err_xdu++; bch 756 drivers/isdn/hardware/mISDN/w6692.c if (wch->bch.tx_skb) { bch 757 drivers/isdn/hardware/mISDN/w6692.c if (!test_bit(FLG_TRANSPARENT, &wch->bch.Flags)) bch 758 drivers/isdn/hardware/mISDN/w6692.c wch->bch.tx_idx = 0; bch 759 drivers/isdn/hardware/mISDN/w6692.c } else if (test_bit(FLG_FILLEMPTY, &wch->bch.Flags)) { bch 760 drivers/isdn/hardware/mISDN/w6692.c test_and_set_bit(FLG_TX_EMPTY, &wch->bch.Flags); bch 933 drivers/isdn/hardware/mISDN/w6692.c struct bchannel *bch = container_of(ch, struct bchannel, ch); bch 934 drivers/isdn/hardware/mISDN/w6692.c struct w6692_ch *bc = container_of(bch, struct w6692_ch, bch); bch 935 drivers/isdn/hardware/mISDN/w6692.c struct w6692_hw *card = bch->hw; bch 943 drivers/isdn/hardware/mISDN/w6692.c ret = bchannel_senddata(bch, skb); bch 952 drivers/isdn/hardware/mISDN/w6692.c if (!test_and_set_bit(FLG_ACTIVE, &bch->Flags)) bch 963 drivers/isdn/hardware/mISDN/w6692.c mISDN_clear_bchannel(bch); bch 981 drivers/isdn/hardware/mISDN/w6692.c channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq) bch 983 drivers/isdn/hardware/mISDN/w6692.c return mISDN_ctrl_bchannel(bch, cq); bch 989 drivers/isdn/hardware/mISDN/w6692.c struct bchannel *bch; bch 995 drivers/isdn/hardware/mISDN/w6692.c bch = &card->bc[rq->adr.channel - 1].bch; bch 996 drivers/isdn/hardware/mISDN/w6692.c if (test_and_set_bit(FLG_OPEN, &bch->Flags)) bch 998 drivers/isdn/hardware/mISDN/w6692.c bch->ch.protocol = rq->protocol; bch 999 drivers/isdn/hardware/mISDN/w6692.c rq->ch = &bch->ch; bch 1026 drivers/isdn/hardware/mISDN/w6692.c struct bchannel *bch = container_of(ch, struct bchannel, ch); bch 1027 drivers/isdn/hardware/mISDN/w6692.c struct w6692_ch *bc = container_of(bch, struct w6692_ch, bch); bch 1028 drivers/isdn/hardware/mISDN/w6692.c struct w6692_hw *card = bch->hw; bch 1035 drivers/isdn/hardware/mISDN/w6692.c test_and_clear_bit(FLG_OPEN, &bch->Flags); bch 1036 drivers/isdn/hardware/mISDN/w6692.c cancel_work_sync(&bch->workq); bch 1038 drivers/isdn/hardware/mISDN/w6692.c mISDN_clear_bchannel(bch); bch 1047 drivers/isdn/hardware/mISDN/w6692.c ret = channel_bctrl(bch, arg); bch 1261 drivers/isdn/hardware/mISDN/w6692.c mISDN_freebchannel(&card->bc[1].bch); bch 1262 drivers/isdn/hardware/mISDN/w6692.c mISDN_freebchannel(&card->bc[0].bch); bch 1294 drivers/isdn/hardware/mISDN/w6692.c mISDN_initbchannel(&card->bc[i].bch, MAX_DATA_MEM, bch 1296 drivers/isdn/hardware/mISDN/w6692.c card->bc[i].bch.hw = card; bch 1297 drivers/isdn/hardware/mISDN/w6692.c card->bc[i].bch.nr = i + 1; bch 1298 drivers/isdn/hardware/mISDN/w6692.c card->bc[i].bch.ch.nr = i + 1; bch 1299 drivers/isdn/hardware/mISDN/w6692.c card->bc[i].bch.ch.send = w6692_l2l1B; bch 1300 drivers/isdn/hardware/mISDN/w6692.c card->bc[i].bch.ch.ctrl = w6692_bctrl; bch 1302 drivers/isdn/hardware/mISDN/w6692.c list_add(&card->bc[i].bch.ch.list, &card->dch.dev.bchannels); bch 1327 drivers/isdn/hardware/mISDN/w6692.c mISDN_freebchannel(&card->bc[1].bch); bch 1328 drivers/isdn/hardware/mISDN/w6692.c mISDN_freebchannel(&card->bc[0].bch); bch 39 drivers/isdn/mISDN/hwchannel.c struct bchannel *bch = container_of(ws, struct bchannel, workq); bch 43 drivers/isdn/mISDN/hwchannel.c if (test_and_clear_bit(FLG_RECVQUEUE, &bch->Flags)) { bch 44 drivers/isdn/mISDN/hwchannel.c while ((skb = skb_dequeue(&bch->rqueue))) { bch 45 drivers/isdn/mISDN/hwchannel.c bch->rcount--; bch 46 drivers/isdn/mISDN/hwchannel.c if (likely(bch->ch.peer)) { bch 47 drivers/isdn/mISDN/hwchannel.c err = bch->ch.recv(bch->ch.peer, skb); bch 156 drivers/isdn/mISDN/hwchannel.c mISDN_ctrl_bchannel(struct bchannel *bch, struct mISDN_ctrl_req *cq) bch 167 drivers/isdn/mISDN/hwchannel.c memset(bch->fill, cq->p2 & 0xff, MISDN_BCH_FILL_SIZE); bch 168 drivers/isdn/mISDN/hwchannel.c test_and_set_bit(FLG_FILLEMPTY, &bch->Flags); bch 170 drivers/isdn/mISDN/hwchannel.c test_and_clear_bit(FLG_FILLEMPTY, &bch->Flags); bch 175 drivers/isdn/mISDN/hwchannel.c cq->p2 = bch->dropcnt; bch 177 drivers/isdn/mISDN/hwchannel.c test_and_set_bit(FLG_RX_OFF, &bch->Flags); bch 179 drivers/isdn/mISDN/hwchannel.c test_and_clear_bit(FLG_RX_OFF, &bch->Flags); bch 180 drivers/isdn/mISDN/hwchannel.c bch->dropcnt = 0; bch 184 drivers/isdn/mISDN/hwchannel.c bch->next_maxlen = cq->p2; bch 186 drivers/isdn/mISDN/hwchannel.c bch->next_minlen = cq->p1; bch 188 drivers/isdn/mISDN/hwchannel.c cq->p1 = bch->minlen; bch 189 drivers/isdn/mISDN/hwchannel.c cq->p2 = bch->maxlen; bch 249 drivers/isdn/mISDN/hwchannel.c recv_Bchannel(struct bchannel *bch, unsigned int id, bool force) bch 254 drivers/isdn/mISDN/hwchannel.c if (unlikely(!bch->rx_skb)) bch 256 drivers/isdn/mISDN/hwchannel.c if (unlikely(!bch->rx_skb->len)) { bch 260 drivers/isdn/mISDN/hwchannel.c dev_kfree_skb(bch->rx_skb); bch 261 drivers/isdn/mISDN/hwchannel.c bch->rx_skb = NULL; bch 263 drivers/isdn/mISDN/hwchannel.c if (test_bit(FLG_TRANSPARENT, &bch->Flags) && bch 264 drivers/isdn/mISDN/hwchannel.c (bch->rx_skb->len < bch->minlen) && !force) bch 266 drivers/isdn/mISDN/hwchannel.c hh = mISDN_HEAD_P(bch->rx_skb); bch 269 drivers/isdn/mISDN/hwchannel.c if (bch->rcount >= 64) { bch 272 drivers/isdn/mISDN/hwchannel.c bch->nr); bch 273 drivers/isdn/mISDN/hwchannel.c skb_queue_purge(&bch->rqueue); bch 275 drivers/isdn/mISDN/hwchannel.c bch->rcount++; bch 276 drivers/isdn/mISDN/hwchannel.c skb_queue_tail(&bch->rqueue, bch->rx_skb); bch 277 drivers/isdn/mISDN/hwchannel.c bch->rx_skb = NULL; bch 278 drivers/isdn/mISDN/hwchannel.c schedule_event(bch, FLG_RECVQUEUE); bch 292 drivers/isdn/mISDN/hwchannel.c recv_Bchannel_skb(struct bchannel *bch, struct sk_buff *skb) bch 294 drivers/isdn/mISDN/hwchannel.c if (bch->rcount >= 64) { bch 296 drivers/isdn/mISDN/hwchannel.c "flushing!\n", bch); bch 297 drivers/isdn/mISDN/hwchannel.c skb_queue_purge(&bch->rqueue); bch 298 drivers/isdn/mISDN/hwchannel.c bch->rcount = 0; bch 300 drivers/isdn/mISDN/hwchannel.c bch->rcount++; bch 301 drivers/isdn/mISDN/hwchannel.c skb_queue_tail(&bch->rqueue, skb); bch 302 drivers/isdn/mISDN/hwchannel.c schedule_event(bch, FLG_RECVQUEUE); bch 338 drivers/isdn/mISDN/hwchannel.c confirm_Bsend(struct bchannel *bch) bch 342 drivers/isdn/mISDN/hwchannel.c if (bch->rcount >= 64) { bch 344 drivers/isdn/mISDN/hwchannel.c "flushing!\n", bch); bch 345 drivers/isdn/mISDN/hwchannel.c skb_queue_purge(&bch->rqueue); bch 346 drivers/isdn/mISDN/hwchannel.c bch->rcount = 0; bch 348 drivers/isdn/mISDN/hwchannel.c skb = _alloc_mISDN_skb(PH_DATA_CNF, mISDN_HEAD_ID(bch->tx_skb), bch 352 drivers/isdn/mISDN/hwchannel.c mISDN_HEAD_ID(bch->tx_skb)); bch 355 drivers/isdn/mISDN/hwchannel.c bch->rcount++; bch 356 drivers/isdn/mISDN/hwchannel.c skb_queue_tail(&bch->rqueue, skb); bch 357 drivers/isdn/mISDN/hwchannel.c schedule_event(bch, FLG_RECVQUEUE); bch 361 drivers/isdn/mISDN/hwchannel.c get_next_bframe(struct bchannel *bch) bch 363 drivers/isdn/mISDN/hwchannel.c bch->tx_idx = 0; bch 364 drivers/isdn/mISDN/hwchannel.c if (test_bit(FLG_TX_NEXT, &bch->Flags)) { bch 365 drivers/isdn/mISDN/hwchannel.c bch->tx_skb = bch->next_skb; bch 366 drivers/isdn/mISDN/hwchannel.c if (bch->tx_skb) { bch 367 drivers/isdn/mISDN/hwchannel.c bch->next_skb = NULL; bch 368 drivers/isdn/mISDN/hwchannel.c test_and_clear_bit(FLG_TX_NEXT, &bch->Flags); bch 370 drivers/isdn/mISDN/hwchannel.c confirm_Bsend(bch); bch 373 drivers/isdn/mISDN/hwchannel.c test_and_clear_bit(FLG_TX_NEXT, &bch->Flags); bch 377 drivers/isdn/mISDN/hwchannel.c bch->tx_skb = NULL; bch 378 drivers/isdn/mISDN/hwchannel.c test_and_clear_bit(FLG_TX_BUSY, &bch->Flags); bch 470 drivers/isdn/mISDN/hwchannel.c bchannel_get_rxbuf(struct bchannel *bch, int reqlen) bch 474 drivers/isdn/mISDN/hwchannel.c if (bch->rx_skb) { bch 475 drivers/isdn/mISDN/hwchannel.c len = skb_tailroom(bch->rx_skb); bch 478 drivers/isdn/mISDN/hwchannel.c bch->nr, reqlen, len); bch 479 drivers/isdn/mISDN/hwchannel.c if (test_bit(FLG_TRANSPARENT, &bch->Flags)) { bch 481 drivers/isdn/mISDN/hwchannel.c recv_Bchannel(bch, 0, true); bch 491 drivers/isdn/mISDN/hwchannel.c if (unlikely(bch->maxlen != bch->next_maxlen)) bch 492 drivers/isdn/mISDN/hwchannel.c bch->maxlen = bch->next_maxlen; bch 493 drivers/isdn/mISDN/hwchannel.c if (unlikely(bch->minlen != bch->next_minlen)) bch 494 drivers/isdn/mISDN/hwchannel.c bch->minlen = bch->next_minlen; bch 495 drivers/isdn/mISDN/hwchannel.c if (unlikely(reqlen > bch->maxlen)) bch 497 drivers/isdn/mISDN/hwchannel.c if (test_bit(FLG_TRANSPARENT, &bch->Flags)) { bch 498 drivers/isdn/mISDN/hwchannel.c if (reqlen >= bch->minlen) { bch 501 drivers/isdn/mISDN/hwchannel.c len = 2 * bch->minlen; bch 502 drivers/isdn/mISDN/hwchannel.c if (len > bch->maxlen) bch 503 drivers/isdn/mISDN/hwchannel.c len = bch->maxlen; bch 507 drivers/isdn/mISDN/hwchannel.c len = bch->maxlen; bch 509 drivers/isdn/mISDN/hwchannel.c bch->rx_skb = mI_alloc_skb(len, GFP_ATOMIC); bch 510 drivers/isdn/mISDN/hwchannel.c if (!bch->rx_skb) { bch 512 drivers/isdn/mISDN/hwchannel.c bch->nr, len); bch 34 drivers/isdn/mISDN/l1oip.h struct bchannel *bch; bch 354 drivers/isdn/mISDN/l1oip_core.c struct bchannel *bch; bch 376 drivers/isdn/mISDN/l1oip_core.c bch = hc->chan[channel].bch; bch 377 drivers/isdn/mISDN/l1oip_core.c if (!dch && !bch) { bch 405 drivers/isdn/mISDN/l1oip_core.c if (bch) { bch 435 drivers/isdn/mISDN/l1oip_core.c queue_ch_frame(&bch->ch, PH_DATA_IND, rx_counter, nskb); bch 1005 drivers/isdn/mISDN/l1oip_core.c struct bchannel *bch; bch 1013 drivers/isdn/mISDN/l1oip_core.c bch = hc->chan[ch].bch; bch 1014 drivers/isdn/mISDN/l1oip_core.c if (!bch) { bch 1019 drivers/isdn/mISDN/l1oip_core.c if (test_and_set_bit(FLG_OPEN, &bch->Flags)) bch 1021 drivers/isdn/mISDN/l1oip_core.c bch->ch.protocol = rq->protocol; bch 1022 drivers/isdn/mISDN/l1oip_core.c rq->ch = &bch->ch; bch 1086 drivers/isdn/mISDN/l1oip_core.c struct bchannel *bch = container_of(ch, struct bchannel, ch); bch 1087 drivers/isdn/mISDN/l1oip_core.c struct l1oip *hc = bch->hw; bch 1111 drivers/isdn/mISDN/l1oip_core.c hc->chan[bch->slot].tx_counter += l; bch 1122 drivers/isdn/mISDN/l1oip_core.c hc->chan[bch->slot].tx_counter += l; bch 1137 drivers/isdn/mISDN/l1oip_core.c l1oip_socket_send(hc, hc->codec, bch->slot, 0, bch 1138 drivers/isdn/mISDN/l1oip_core.c hc->chan[bch->slot].tx_counter, p, ll); bch 1139 drivers/isdn/mISDN/l1oip_core.c hc->chan[bch->slot].tx_counter += ll; bch 1149 drivers/isdn/mISDN/l1oip_core.c , __func__, bch->slot, hc->b_num + 1); bch 1150 drivers/isdn/mISDN/l1oip_core.c hc->chan[bch->slot].codecstate = 0; bch 1151 drivers/isdn/mISDN/l1oip_core.c test_and_set_bit(FLG_ACTIVE, &bch->Flags); bch 1158 drivers/isdn/mISDN/l1oip_core.c "(1..%d)\n", __func__, bch->slot, bch 1160 drivers/isdn/mISDN/l1oip_core.c test_and_clear_bit(FLG_ACTIVE, &bch->Flags); bch 1171 drivers/isdn/mISDN/l1oip_core.c channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq) bch 1201 drivers/isdn/mISDN/l1oip_core.c struct bchannel *bch = container_of(ch, struct bchannel, ch); bch 1204 drivers/isdn/mISDN/l1oip_core.c if (bch->debug & DEBUG_HW) bch 1209 drivers/isdn/mISDN/l1oip_core.c test_and_clear_bit(FLG_OPEN, &bch->Flags); bch 1210 drivers/isdn/mISDN/l1oip_core.c test_and_clear_bit(FLG_ACTIVE, &bch->Flags); bch 1217 drivers/isdn/mISDN/l1oip_core.c err = channel_bctrl(bch, arg); bch 1253 drivers/isdn/mISDN/l1oip_core.c if (hc->chan[ch].bch) { bch 1254 drivers/isdn/mISDN/l1oip_core.c mISDN_freebchannel(hc->chan[ch].bch); bch 1255 drivers/isdn/mISDN/l1oip_core.c kfree(hc->chan[ch].bch); bch 1288 drivers/isdn/mISDN/l1oip_core.c struct bchannel *bch; bch 1392 drivers/isdn/mISDN/l1oip_core.c bch = kzalloc(sizeof(struct bchannel), GFP_KERNEL); bch 1393 drivers/isdn/mISDN/l1oip_core.c if (!bch) { bch 1398 drivers/isdn/mISDN/l1oip_core.c bch->nr = i + ch; bch 1399 drivers/isdn/mISDN/l1oip_core.c bch->slot = i + ch; bch 1400 drivers/isdn/mISDN/l1oip_core.c bch->debug = debug; bch 1401 drivers/isdn/mISDN/l1oip_core.c mISDN_initbchannel(bch, MAX_DATA_MEM, 0); bch 1402 drivers/isdn/mISDN/l1oip_core.c bch->hw = hc; bch 1403 drivers/isdn/mISDN/l1oip_core.c bch->ch.send = handle_bmsg; bch 1404 drivers/isdn/mISDN/l1oip_core.c bch->ch.ctrl = l1oip_bctrl; bch 1405 drivers/isdn/mISDN/l1oip_core.c bch->ch.nr = i + ch; bch 1406 drivers/isdn/mISDN/l1oip_core.c list_add(&bch->ch.list, &dch->dev.bchannels); bch 1407 drivers/isdn/mISDN/l1oip_core.c hc->chan[i + ch].bch = bch; bch 1408 drivers/isdn/mISDN/l1oip_core.c set_channelmap(bch->nr, dch->dev.channelmap); bch 144 drivers/lightnvm/core.c int bch = lun_begin / dev->geo.num_lun; bch 168 drivers/lightnvm/core.c struct nvm_ch_map *ch_rmap = &dev_rmap->chnls[i + bch]; bch 178 drivers/lightnvm/core.c ch_map->ch_off = ch_rmap->ch_off = bch; bch 650 drivers/mtd/devices/docg3.c numerrs = decode_bch(docg3->cascade->bch, NULL, bch 1987 drivers/mtd/devices/docg3.c cascade->bch = init_bch(DOC_ECC_BCH_M, DOC_ECC_BCH_T, bch 1989 drivers/mtd/devices/docg3.c if (!cascade->bch) bch 2024 drivers/mtd/devices/docg3.c free_bch(cascade->bch); bch 2048 drivers/mtd/devices/docg3.c free_bch(docg3->cascade->bch); bch 267 drivers/mtd/devices/docg3.h struct bch_control *bch; bch 801 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c if (this->bch) bch 1462 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c this->bch = true; bch 1556 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c this->bch = true; bch 1581 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c this->bch = true; bch 2325 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c if (this->bch) { bch 2340 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c if (!this->bch) bch 2371 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c if (this->bch) { bch 2383 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c (this->bch ? MXS_DMA_CTRL_WAIT4END : 0)); bch 2387 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c if (!this->bch) bch 2492 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c if (this->bch) { bch 2499 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c if (this->bch && buf_read) { bch 2541 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c this->bch = false; bch 143 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h bool bch; bch 62 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c static inline void jz4725b_bch_config_set(struct ingenic_ecc *bch, u32 cfg) bch 64 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c writel(cfg, bch->base + BCH_BHCSR); bch 67 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c static inline void jz4725b_bch_config_clear(struct ingenic_ecc *bch, u32 cfg) bch 69 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c writel(cfg, bch->base + BCH_BHCCR); bch 72 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c static int jz4725b_bch_reset(struct ingenic_ecc *bch, bch 78 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c writel(readl(bch->base + BCH_BHINT), bch->base + BCH_BHINT); bch 81 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c jz4725b_bch_config_clear(bch, 0x1f); bch 82 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c jz4725b_bch_config_set(bch, BCH_BHCR_BCHE); bch 85 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c jz4725b_bch_config_set(bch, BCH_BHCR_BSEL); bch 87 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c jz4725b_bch_config_clear(bch, BCH_BHCR_BSEL); bch 90 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c jz4725b_bch_config_set(bch, BCH_BHCR_ENCE); bch 92 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c jz4725b_bch_config_clear(bch, BCH_BHCR_ENCE); bch 94 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c jz4725b_bch_config_set(bch, BCH_BHCR_INIT); bch 107 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c writel(reg, bch->base + BCH_BHCNT); bch 112 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c static void jz4725b_bch_disable(struct ingenic_ecc *bch) bch 115 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c writel(readl(bch->base + BCH_BHINT), bch->base + BCH_BHINT); bch 118 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c jz4725b_bch_config_clear(bch, BCH_BHCR_BCHE); bch 121 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c static void jz4725b_bch_write_data(struct ingenic_ecc *bch, const u8 *buf, bch 125 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c writeb(*buf++, bch->base + BCH_BHDR); bch 128 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c static void jz4725b_bch_read_parity(struct ingenic_ecc *bch, u8 *buf, bch 139 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c *dest32++ = readl_relaxed(bch->base + BCH_BHPAR0 + offset); bch 144 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c val = readl_relaxed(bch->base + BCH_BHPAR0 + offset); bch 158 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c static int jz4725b_bch_wait_complete(struct ingenic_ecc *bch, unsigned int irq, bch 170 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c ret = readl_relaxed_poll_timeout(bch->base + BCH_BHINT, reg, bch 178 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c writel(reg, bch->base + BCH_BHINT); bch 183 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c static int jz4725b_calculate(struct ingenic_ecc *bch, bch 189 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c mutex_lock(&bch->lock); bch 191 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c ret = jz4725b_bch_reset(bch, params, true); bch 193 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c dev_err(bch->dev, "Unable to init BCH with given parameters\n"); bch 197 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c jz4725b_bch_write_data(bch, buf, params->size); bch 199 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c ret = jz4725b_bch_wait_complete(bch, BCH_BHINT_ENCF, NULL); bch 201 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c dev_err(bch->dev, "timed out while calculating ECC\n"); bch 205 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c jz4725b_bch_read_parity(bch, ecc_code, params->bytes); bch 208 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c jz4725b_bch_disable(bch); bch 209 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c mutex_unlock(&bch->lock); bch 214 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c static int jz4725b_correct(struct ingenic_ecc *bch, bch 222 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c mutex_lock(&bch->lock); bch 224 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c ret = jz4725b_bch_reset(bch, params, false); bch 226 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c dev_err(bch->dev, "Unable to init BCH with given parameters\n"); bch 230 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c jz4725b_bch_write_data(bch, buf, params->size); bch 231 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c jz4725b_bch_write_data(bch, ecc_code, params->bytes); bch 233 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c ret = jz4725b_bch_wait_complete(bch, BCH_BHINT_DECF, ®); bch 235 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c dev_err(bch->dev, "timed out while correcting data\n"); bch 258 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c reg = readl(bch->base + BCH_BHERR0 + (i * 4)); bch 266 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c jz4725b_bch_disable(bch); bch 267 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c mutex_unlock(&bch->lock); bch 62 drivers/mtd/nand/raw/ingenic/jz4780_bch.c static void jz4780_bch_reset(struct ingenic_ecc *bch, bch 68 drivers/mtd/nand/raw/ingenic/jz4780_bch.c writel(readl(bch->base + BCH_BHINT), bch->base + BCH_BHINT); bch 73 drivers/mtd/nand/raw/ingenic/jz4780_bch.c writel(reg, bch->base + BCH_BHCNT); bch 80 drivers/mtd/nand/raw/ingenic/jz4780_bch.c writel(reg, bch->base + BCH_BHCR); bch 83 drivers/mtd/nand/raw/ingenic/jz4780_bch.c static void jz4780_bch_disable(struct ingenic_ecc *bch) bch 85 drivers/mtd/nand/raw/ingenic/jz4780_bch.c writel(readl(bch->base + BCH_BHINT), bch->base + BCH_BHINT); bch 86 drivers/mtd/nand/raw/ingenic/jz4780_bch.c writel(BCH_BHCR_BCHE, bch->base + BCH_BHCCR); bch 89 drivers/mtd/nand/raw/ingenic/jz4780_bch.c static void jz4780_bch_write_data(struct ingenic_ecc *bch, const void *buf, bch 99 drivers/mtd/nand/raw/ingenic/jz4780_bch.c writel(*src32++, bch->base + BCH_BHDR); bch 103 drivers/mtd/nand/raw/ingenic/jz4780_bch.c writeb(*src8++, bch->base + BCH_BHDR); bch 106 drivers/mtd/nand/raw/ingenic/jz4780_bch.c static void jz4780_bch_read_parity(struct ingenic_ecc *bch, void *buf, bch 117 drivers/mtd/nand/raw/ingenic/jz4780_bch.c *dest32++ = readl(bch->base + BCH_BHPAR0 + offset); bch 122 drivers/mtd/nand/raw/ingenic/jz4780_bch.c val = readl(bch->base + BCH_BHPAR0 + offset); bch 136 drivers/mtd/nand/raw/ingenic/jz4780_bch.c static bool jz4780_bch_wait_complete(struct ingenic_ecc *bch, unsigned int irq, bch 148 drivers/mtd/nand/raw/ingenic/jz4780_bch.c ret = readl_poll_timeout(bch->base + BCH_BHINT, reg, bch 156 drivers/mtd/nand/raw/ingenic/jz4780_bch.c writel(reg, bch->base + BCH_BHINT); bch 160 drivers/mtd/nand/raw/ingenic/jz4780_bch.c static int jz4780_calculate(struct ingenic_ecc *bch, bch 166 drivers/mtd/nand/raw/ingenic/jz4780_bch.c mutex_lock(&bch->lock); bch 168 drivers/mtd/nand/raw/ingenic/jz4780_bch.c jz4780_bch_reset(bch, params, true); bch 169 drivers/mtd/nand/raw/ingenic/jz4780_bch.c jz4780_bch_write_data(bch, buf, params->size); bch 171 drivers/mtd/nand/raw/ingenic/jz4780_bch.c if (jz4780_bch_wait_complete(bch, BCH_BHINT_ENCF, NULL)) { bch 172 drivers/mtd/nand/raw/ingenic/jz4780_bch.c jz4780_bch_read_parity(bch, ecc_code, params->bytes); bch 174 drivers/mtd/nand/raw/ingenic/jz4780_bch.c dev_err(bch->dev, "timed out while calculating ECC\n"); bch 178 drivers/mtd/nand/raw/ingenic/jz4780_bch.c jz4780_bch_disable(bch); bch 179 drivers/mtd/nand/raw/ingenic/jz4780_bch.c mutex_unlock(&bch->lock); bch 183 drivers/mtd/nand/raw/ingenic/jz4780_bch.c static int jz4780_correct(struct ingenic_ecc *bch, bch 190 drivers/mtd/nand/raw/ingenic/jz4780_bch.c mutex_lock(&bch->lock); bch 192 drivers/mtd/nand/raw/ingenic/jz4780_bch.c jz4780_bch_reset(bch, params, false); bch 193 drivers/mtd/nand/raw/ingenic/jz4780_bch.c jz4780_bch_write_data(bch, buf, params->size); bch 194 drivers/mtd/nand/raw/ingenic/jz4780_bch.c jz4780_bch_write_data(bch, ecc_code, params->bytes); bch 196 drivers/mtd/nand/raw/ingenic/jz4780_bch.c if (!jz4780_bch_wait_complete(bch, BCH_BHINT_DECF, ®)) { bch 197 drivers/mtd/nand/raw/ingenic/jz4780_bch.c dev_err(bch->dev, "timed out while correcting data\n"); bch 203 drivers/mtd/nand/raw/ingenic/jz4780_bch.c dev_warn(bch->dev, "uncorrectable ECC error\n"); bch 214 drivers/mtd/nand/raw/ingenic/jz4780_bch.c reg = readl(bch->base + BCH_BHERR0 + (i * 4)); bch 227 drivers/mtd/nand/raw/ingenic/jz4780_bch.c jz4780_bch_disable(bch); bch 228 drivers/mtd/nand/raw/ingenic/jz4780_bch.c mutex_unlock(&bch->lock); bch 234 drivers/mtd/nand/raw/ingenic/jz4780_bch.c struct ingenic_ecc *bch; bch 241 drivers/mtd/nand/raw/ingenic/jz4780_bch.c bch = platform_get_drvdata(pdev); bch 242 drivers/mtd/nand/raw/ingenic/jz4780_bch.c clk_set_rate(bch->clk, BCH_CLK_RATE); bch 59 drivers/mtd/nand/raw/meson_nand.c #define CMDRWGEN(cmd_dir, ran, bch, short_mode, page_size, pages) \ bch 63 drivers/mtd/nand/raw/meson_nand.c ((bch) << 14) | \ bch 125 drivers/mtd/nand/raw/meson_nand.c u32 bch; bch 188 drivers/mtd/nand/raw/meson_nand.c #define MESON_ECC_DATA(b, s) { .bch = (b), .strength = (s)} bch 271 drivers/mtd/nand/raw/meson_nand.c u32 bch = meson_chip->bch_mode, cmd; bch 285 drivers/mtd/nand/raw/meson_nand.c cmd = CMDRWGEN(DMA_DIR(dir), scrambler, bch, bch 1149 drivers/mtd/nand/raw/meson_nand.c meson_chip->bch_mode = meson_ecc[i].bch; bch 26 drivers/mtd/nand/raw/nand_bch.c struct bch_control *bch; bch 44 drivers/mtd/nand/raw/nand_bch.c encode_bch(nbc->bch, buf, chip->ecc.size, code); bch 70 drivers/mtd/nand/raw/nand_bch.c count = decode_bch(nbc->bch, NULL, chip->ecc.size, read_ecc, calc_ecc, bch 133 drivers/mtd/nand/raw/nand_bch.c nbc->bch = init_bch(m, t, 0); bch 134 drivers/mtd/nand/raw/nand_bch.c if (!nbc->bch) bch 138 drivers/mtd/nand/raw/nand_bch.c if (nbc->bch->ecc_bytes != eccbytes) { bch 140 drivers/mtd/nand/raw/nand_bch.c eccbytes, nbc->bch->ecc_bytes); bch 185 drivers/mtd/nand/raw/nand_bch.c encode_bch(nbc->bch, erased_page, eccsize, nbc->eccmask); bch 208 drivers/mtd/nand/raw/nand_bch.c free_bch(nbc->bch); bch 99 drivers/mtd/nand/raw/nandsim.c static unsigned int bch; bch 131 drivers/mtd/nand/raw/nandsim.c module_param(bch, uint, 0400); bch 165 drivers/mtd/nand/raw/nandsim.c MODULE_PARM_DESC(bch, "Enable BCH ecc and set how many bits should " bch 2183 drivers/mtd/nand/raw/nandsim.c if (!bch) bch 2193 drivers/mtd/nand/raw/nandsim.c eccbytes = ((bch * 13) + 7) / 8; bch 2202 drivers/mtd/nand/raw/nandsim.c NS_ERR("Invalid BCH value %u\n", bch); bch 2209 drivers/mtd/nand/raw/nandsim.c chip->ecc.strength = bch; bch 2212 drivers/mtd/nand/raw/nandsim.c NS_INFO("Using %u-bit/%u bytes BCH ECC\n", bch, chip->ecc.size); bch 58 include/linux/bch.h void free_bch(struct bch_control *bch); bch 60 include/linux/bch.h void encode_bch(struct bch_control *bch, const uint8_t *data, bch 63 include/linux/bch.h int decode_bch(struct bch_control *bch, const uint8_t *data, unsigned int len, bch 326 include/linux/mISDNif.h struct ph_info_ch bch[]; bch 120 lib/bch.c static void encode_bch_unaligned(struct bch_control *bch, bch 126 lib/bch.c const int l = BCH_ECC_WORDS(bch)-1; bch 129 lib/bch.c p = bch->mod8_tab + (l+1)*(((ecc[0] >> 24)^(*data++)) & 0xff); bch 141 lib/bch.c static void load_ecc8(struct bch_control *bch, uint32_t *dst, bch 145 lib/bch.c unsigned int i, nwords = BCH_ECC_WORDS(bch)-1; bch 150 lib/bch.c memcpy(pad, src, BCH_ECC_BYTES(bch)-4*nwords); bch 157 lib/bch.c static void store_ecc8(struct bch_control *bch, uint8_t *dst, bch 161 lib/bch.c unsigned int i, nwords = BCH_ECC_WORDS(bch)-1; bch 173 lib/bch.c memcpy(dst, pad, BCH_ECC_BYTES(bch)-4*nwords); bch 190 lib/bch.c void encode_bch(struct bch_control *bch, const uint8_t *data, bch 193 lib/bch.c const unsigned int l = BCH_ECC_WORDS(bch)-1; bch 197 lib/bch.c const size_t r_bytes = BCH_ECC_WORDS(bch) * sizeof(*r); bch 198 lib/bch.c const uint32_t * const tab0 = bch->mod8_tab; bch 209 lib/bch.c load_ecc8(bch, bch->ecc_buf, ecc); bch 211 lib/bch.c memset(bch->ecc_buf, 0, r_bytes); bch 218 lib/bch.c encode_bch_unaligned(bch, data, mlen, bch->ecc_buf); bch 228 lib/bch.c memcpy(r, bch->ecc_buf, r_bytes); bch 254 lib/bch.c memcpy(bch->ecc_buf, r, r_bytes); bch 258 lib/bch.c encode_bch_unaligned(bch, data, len, bch->ecc_buf); bch 262 lib/bch.c store_ecc8(bch, ecc, bch->ecc_buf); bch 266 lib/bch.c static inline int modulo(struct bch_control *bch, unsigned int v) bch 268 lib/bch.c const unsigned int n = GF_N(bch); bch 271 lib/bch.c v = (v & n) + (v >> GF_M(bch)); bch 279 lib/bch.c static inline int mod_s(struct bch_control *bch, unsigned int v) bch 281 lib/bch.c const unsigned int n = GF_N(bch); bch 305 lib/bch.c static inline unsigned int gf_mul(struct bch_control *bch, unsigned int a, bch 308 lib/bch.c return (a && b) ? bch->a_pow_tab[mod_s(bch, bch->a_log_tab[a]+ bch 309 lib/bch.c bch->a_log_tab[b])] : 0; bch 312 lib/bch.c static inline unsigned int gf_sqr(struct bch_control *bch, unsigned int a) bch 314 lib/bch.c return a ? bch->a_pow_tab[mod_s(bch, 2*bch->a_log_tab[a])] : 0; bch 317 lib/bch.c static inline unsigned int gf_div(struct bch_control *bch, unsigned int a, bch 320 lib/bch.c return a ? bch->a_pow_tab[mod_s(bch, bch->a_log_tab[a]+ bch 321 lib/bch.c GF_N(bch)-bch->a_log_tab[b])] : 0; bch 324 lib/bch.c static inline unsigned int gf_inv(struct bch_control *bch, unsigned int a) bch 326 lib/bch.c return bch->a_pow_tab[GF_N(bch)-bch->a_log_tab[a]]; bch 329 lib/bch.c static inline unsigned int a_pow(struct bch_control *bch, int i) bch 331 lib/bch.c return bch->a_pow_tab[modulo(bch, i)]; bch 334 lib/bch.c static inline int a_log(struct bch_control *bch, unsigned int x) bch 336 lib/bch.c return bch->a_log_tab[x]; bch 339 lib/bch.c static inline int a_ilog(struct bch_control *bch, unsigned int x) bch 341 lib/bch.c return mod_s(bch, GF_N(bch)-bch->a_log_tab[x]); bch 347 lib/bch.c static void compute_syndromes(struct bch_control *bch, uint32_t *ecc, bch 353 lib/bch.c const int t = GF_T(bch); bch 355 lib/bch.c s = bch->ecc_bits; bch 370 lib/bch.c syn[j] ^= a_pow(bch, (j+1)*(i+s)); bch 378 lib/bch.c syn[2*j+1] = gf_sqr(bch, syn[j]); bch 386 lib/bch.c static int compute_error_locator_polynomial(struct bch_control *bch, bch 389 lib/bch.c const unsigned int t = GF_T(bch); bch 390 lib/bch.c const unsigned int n = GF_N(bch); bch 392 lib/bch.c struct gf_poly *elp = bch->elp; bch 393 lib/bch.c struct gf_poly *pelp = bch->poly_2t[0]; bch 394 lib/bch.c struct gf_poly *elp_copy = bch->poly_2t[1]; bch 411 lib/bch.c tmp = a_log(bch, d)+n-a_log(bch, pd); bch 414 lib/bch.c l = a_log(bch, pelp->c[j]); bch 415 lib/bch.c elp->c[j+k] ^= a_pow(bch, tmp+l); bch 431 lib/bch.c d ^= gf_mul(bch, elp->c[j], syn[2*i+2-j]); bch 442 lib/bch.c static int solve_linear_system(struct bch_control *bch, unsigned int *rows, bch 445 lib/bch.c const int m = GF_M(bch); bch 518 lib/bch.c static int find_affine4_roots(struct bch_control *bch, unsigned int a, bch 523 lib/bch.c const int m = GF_M(bch); bch 526 lib/bch.c j = a_log(bch, b); bch 527 lib/bch.c k = a_log(bch, a); bch 532 lib/bch.c rows[i+1] = bch->a_pow_tab[4*i]^ bch 533 lib/bch.c (a ? bch->a_pow_tab[mod_s(bch, k)] : 0)^ bch 534 lib/bch.c (b ? bch->a_pow_tab[mod_s(bch, j)] : 0); bch 549 lib/bch.c return solve_linear_system(bch, rows, roots, 4); bch 555 lib/bch.c static int find_poly_deg1_roots(struct bch_control *bch, struct gf_poly *poly, bch 562 lib/bch.c roots[n++] = mod_s(bch, GF_N(bch)-bch->a_log_tab[poly->c[0]]+ bch 563 lib/bch.c bch->a_log_tab[poly->c[1]]); bch 570 lib/bch.c static int find_poly_deg2_roots(struct bch_control *bch, struct gf_poly *poly, bch 578 lib/bch.c l0 = bch->a_log_tab[poly->c[0]]; bch 579 lib/bch.c l1 = bch->a_log_tab[poly->c[1]]; bch 580 lib/bch.c l2 = bch->a_log_tab[poly->c[2]]; bch 583 lib/bch.c u = a_pow(bch, l0+l2+2*(GF_N(bch)-l1)); bch 594 lib/bch.c r ^= bch->xi_tab[i]; bch 598 lib/bch.c if ((gf_sqr(bch, r)^r) == u) { bch 600 lib/bch.c roots[n++] = modulo(bch, 2*GF_N(bch)-l1- bch 601 lib/bch.c bch->a_log_tab[r]+l2); bch 602 lib/bch.c roots[n++] = modulo(bch, 2*GF_N(bch)-l1- bch 603 lib/bch.c bch->a_log_tab[r^1]+l2); bch 612 lib/bch.c static int find_poly_deg3_roots(struct bch_control *bch, struct gf_poly *poly, bch 621 lib/bch.c c2 = gf_div(bch, poly->c[0], e3); bch 622 lib/bch.c b2 = gf_div(bch, poly->c[1], e3); bch 623 lib/bch.c a2 = gf_div(bch, poly->c[2], e3); bch 626 lib/bch.c c = gf_mul(bch, a2, c2); /* c = a2c2 */ bch 627 lib/bch.c b = gf_mul(bch, a2, b2)^c2; /* b = a2b2 + c2 */ bch 628 lib/bch.c a = gf_sqr(bch, a2)^b2; /* a = a2^2 + b2 */ bch 631 lib/bch.c if (find_affine4_roots(bch, a, b, c, tmp) == 4) { bch 635 lib/bch.c roots[n++] = a_ilog(bch, tmp[i]); bch 645 lib/bch.c static int find_poly_deg4_roots(struct bch_control *bch, struct gf_poly *poly, bch 656 lib/bch.c d = gf_div(bch, poly->c[0], e4); bch 657 lib/bch.c c = gf_div(bch, poly->c[1], e4); bch 658 lib/bch.c b = gf_div(bch, poly->c[2], e4); bch 659 lib/bch.c a = gf_div(bch, poly->c[3], e4); bch 666 lib/bch.c f = gf_div(bch, c, a); bch 667 lib/bch.c l = a_log(bch, f); bch 668 lib/bch.c l += (l & 1) ? GF_N(bch) : 0; bch 669 lib/bch.c e = a_pow(bch, l/2); bch 677 lib/bch.c d = a_pow(bch, 2*l)^gf_mul(bch, b, f)^d; bch 678 lib/bch.c b = gf_mul(bch, a, e)^b; bch 685 lib/bch.c c2 = gf_inv(bch, d); bch 686 lib/bch.c b2 = gf_div(bch, a, d); bch 687 lib/bch.c a2 = gf_div(bch, b, d); bch 695 lib/bch.c if (find_affine4_roots(bch, a2, b2, c2, roots) == 4) { bch 698 lib/bch.c f = a ? gf_inv(bch, roots[i]) : roots[i]; bch 699 lib/bch.c roots[i] = a_ilog(bch, f^e); bch 709 lib/bch.c static void gf_poly_logrep(struct bch_control *bch, bch 712 lib/bch.c int i, d = a->deg, l = GF_N(bch)-a_log(bch, a->c[a->deg]); bch 716 lib/bch.c rep[i] = a->c[i] ? mod_s(bch, a_log(bch, a->c[i])+l) : -1; bch 722 lib/bch.c static void gf_poly_mod(struct bch_control *bch, struct gf_poly *a, bch 734 lib/bch.c rep = bch->cache; bch 735 lib/bch.c gf_poly_logrep(bch, b, rep); bch 740 lib/bch.c la = a_log(bch, c[j]); bch 745 lib/bch.c c[p] ^= bch->a_pow_tab[mod_s(bch, bch 758 lib/bch.c static void gf_poly_div(struct bch_control *bch, struct gf_poly *a, bch 764 lib/bch.c gf_poly_mod(bch, a, b, NULL); bch 776 lib/bch.c static struct gf_poly *gf_poly_gcd(struct bch_control *bch, struct gf_poly *a, bch 790 lib/bch.c gf_poly_mod(bch, a, b, NULL); bch 805 lib/bch.c static void compute_trace_bk_mod(struct bch_control *bch, int k, bch 809 lib/bch.c const int m = GF_M(bch); bch 815 lib/bch.c z->c[1] = bch->a_pow_tab[k]; bch 821 lib/bch.c gf_poly_logrep(bch, f, bch->cache); bch 827 lib/bch.c z->c[2*j] = gf_sqr(bch, z->c[j]); bch 836 lib/bch.c gf_poly_mod(bch, z, f, bch->cache); bch 848 lib/bch.c static void factor_polynomial(struct bch_control *bch, int k, struct gf_poly *f, bch 851 lib/bch.c struct gf_poly *f2 = bch->poly_2t[0]; bch 852 lib/bch.c struct gf_poly *q = bch->poly_2t[1]; bch 853 lib/bch.c struct gf_poly *tk = bch->poly_2t[2]; bch 854 lib/bch.c struct gf_poly *z = bch->poly_2t[3]; bch 863 lib/bch.c compute_trace_bk_mod(bch, k, f, z, tk); bch 868 lib/bch.c gcd = gf_poly_gcd(bch, f2, tk); bch 871 lib/bch.c gf_poly_div(bch, f, gcd, q); bch 884 lib/bch.c static int find_poly_roots(struct bch_control *bch, unsigned int k, bch 893 lib/bch.c cnt = find_poly_deg1_roots(bch, poly, roots); bch 896 lib/bch.c cnt = find_poly_deg2_roots(bch, poly, roots); bch 899 lib/bch.c cnt = find_poly_deg3_roots(bch, poly, roots); bch 902 lib/bch.c cnt = find_poly_deg4_roots(bch, poly, roots); bch 907 lib/bch.c if (poly->deg && (k <= GF_M(bch))) { bch 908 lib/bch.c factor_polynomial(bch, k, poly, &f1, &f2); bch 910 lib/bch.c cnt += find_poly_roots(bch, k+1, f1, roots); bch 912 lib/bch.c cnt += find_poly_roots(bch, k+1, f2, roots+cnt); bch 924 lib/bch.c static int chien_search(struct bch_control *bch, unsigned int len, bch 929 lib/bch.c const unsigned int k = 8*len+bch->ecc_bits; bch 932 lib/bch.c gf_poly_logrep(bch, p, bch->cache); bch 933 lib/bch.c bch->cache[p->deg] = 0; bch 934 lib/bch.c syn0 = gf_div(bch, p->c[0], p->c[p->deg]); bch 936 lib/bch.c for (i = GF_N(bch)-k+1; i <= GF_N(bch); i++) { bch 939 lib/bch.c m = bch->cache[j]; bch 941 lib/bch.c syn ^= a_pow(bch, m+j*i); bch 944 lib/bch.c roots[count++] = GF_N(bch)-i; bch 996 lib/bch.c int decode_bch(struct bch_control *bch, const uint8_t *data, unsigned int len, bch 1000 lib/bch.c const unsigned int ecc_words = BCH_ECC_WORDS(bch); bch 1006 lib/bch.c if (8*len > (bch->n-bch->ecc_bits)) bch 1015 lib/bch.c encode_bch(bch, data, len, NULL); bch 1018 lib/bch.c load_ecc8(bch, bch->ecc_buf, calc_ecc); bch 1022 lib/bch.c load_ecc8(bch, bch->ecc_buf2, recv_ecc); bch 1025 lib/bch.c bch->ecc_buf[i] ^= bch->ecc_buf2[i]; bch 1026 lib/bch.c sum |= bch->ecc_buf[i]; bch 1032 lib/bch.c compute_syndromes(bch, bch->ecc_buf, bch->syn); bch 1033 lib/bch.c syn = bch->syn; bch 1036 lib/bch.c err = compute_error_locator_polynomial(bch, syn); bch 1038 lib/bch.c nroots = find_poly_roots(bch, 1, bch->elp, errloc); bch 1044 lib/bch.c nbits = (len*8)+bch->ecc_bits; bch 1061 lib/bch.c static int build_gf_tables(struct bch_control *bch, unsigned int poly) bch 1067 lib/bch.c if (k != (1u << GF_M(bch))) bch 1070 lib/bch.c for (i = 0; i < GF_N(bch); i++) { bch 1071 lib/bch.c bch->a_pow_tab[i] = x; bch 1072 lib/bch.c bch->a_log_tab[x] = i; bch 1080 lib/bch.c bch->a_pow_tab[GF_N(bch)] = 1; bch 1081 lib/bch.c bch->a_log_tab[0] = 0; bch 1089 lib/bch.c static void build_mod8_tables(struct bch_control *bch, const uint32_t *g) bch 1093 lib/bch.c const int l = BCH_ECC_WORDS(bch); bch 1094 lib/bch.c const int plen = DIV_ROUND_UP(bch->ecc_bits+1, 32); bch 1095 lib/bch.c const int ecclen = DIV_ROUND_UP(bch->ecc_bits, 32); bch 1097 lib/bch.c memset(bch->mod8_tab, 0, 4*256*l*sizeof(*bch->mod8_tab)); bch 1103 lib/bch.c tab = bch->mod8_tab + (b*256+i)*l; bch 1123 lib/bch.c static int build_deg2_base(struct bch_control *bch) bch 1125 lib/bch.c const int m = GF_M(bch); bch 1132 lib/bch.c sum ^= a_pow(bch, i*(1 << j)); bch 1135 lib/bch.c ak = bch->a_pow_tab[i]; bch 1143 lib/bch.c for (x = 0; (x <= GF_N(bch)) && remaining; x++) { bch 1144 lib/bch.c y = gf_sqr(bch, x)^x; bch 1146 lib/bch.c r = a_log(bch, y); bch 1148 lib/bch.c bch->xi_tab[r] = x; bch 1174 lib/bch.c static uint32_t *compute_generator_polynomial(struct bch_control *bch) bch 1176 lib/bch.c const unsigned int m = GF_M(bch); bch 1177 lib/bch.c const unsigned int t = GF_T(bch); bch 1184 lib/bch.c roots = bch_alloc((bch->n+1)*sizeof(*roots), &err); bch 1194 lib/bch.c memset(roots , 0, (bch->n+1)*sizeof(*roots)); bch 1198 lib/bch.c r = mod_s(bch, 2*r); bch 1204 lib/bch.c for (i = 0; i < GF_N(bch); i++) { bch 1207 lib/bch.c r = bch->a_pow_tab[i]; bch 1210 lib/bch.c g->c[j] = gf_mul(bch, g->c[j], r)^g->c[j-1]; bch 1212 lib/bch.c g->c[0] = gf_mul(bch, g->c[0], r); bch 1229 lib/bch.c bch->ecc_bits = g->deg; bch 1264 lib/bch.c struct bch_control *bch = NULL; bch 1306 lib/bch.c bch = kzalloc(sizeof(*bch), GFP_KERNEL); bch 1307 lib/bch.c if (bch == NULL) bch 1310 lib/bch.c bch->m = m; bch 1311 lib/bch.c bch->t = t; bch 1312 lib/bch.c bch->n = (1 << m)-1; bch 1314 lib/bch.c bch->ecc_bytes = DIV_ROUND_UP(m*t, 8); bch 1315 lib/bch.c bch->a_pow_tab = bch_alloc((1+bch->n)*sizeof(*bch->a_pow_tab), &err); bch 1316 lib/bch.c bch->a_log_tab = bch_alloc((1+bch->n)*sizeof(*bch->a_log_tab), &err); bch 1317 lib/bch.c bch->mod8_tab = bch_alloc(words*1024*sizeof(*bch->mod8_tab), &err); bch 1318 lib/bch.c bch->ecc_buf = bch_alloc(words*sizeof(*bch->ecc_buf), &err); bch 1319 lib/bch.c bch->ecc_buf2 = bch_alloc(words*sizeof(*bch->ecc_buf2), &err); bch 1320 lib/bch.c bch->xi_tab = bch_alloc(m*sizeof(*bch->xi_tab), &err); bch 1321 lib/bch.c bch->syn = bch_alloc(2*t*sizeof(*bch->syn), &err); bch 1322 lib/bch.c bch->cache = bch_alloc(2*t*sizeof(*bch->cache), &err); bch 1323 lib/bch.c bch->elp = bch_alloc((t+1)*sizeof(struct gf_poly_deg1), &err); bch 1325 lib/bch.c for (i = 0; i < ARRAY_SIZE(bch->poly_2t); i++) bch 1326 lib/bch.c bch->poly_2t[i] = bch_alloc(GF_POLY_SZ(2*t), &err); bch 1331 lib/bch.c err = build_gf_tables(bch, prim_poly); bch 1336 lib/bch.c genpoly = compute_generator_polynomial(bch); bch 1340 lib/bch.c build_mod8_tables(bch, genpoly); bch 1343 lib/bch.c err = build_deg2_base(bch); bch 1347 lib/bch.c return bch; bch 1350 lib/bch.c free_bch(bch); bch 1359 lib/bch.c void free_bch(struct bch_control *bch) bch 1363 lib/bch.c if (bch) { bch 1364 lib/bch.c kfree(bch->a_pow_tab); bch 1365 lib/bch.c kfree(bch->a_log_tab); bch 1366 lib/bch.c kfree(bch->mod8_tab); bch 1367 lib/bch.c kfree(bch->ecc_buf); bch 1368 lib/bch.c kfree(bch->ecc_buf2); bch 1369 lib/bch.c kfree(bch->xi_tab); bch 1370 lib/bch.c kfree(bch->syn); bch 1371 lib/bch.c kfree(bch->cache); bch 1372 lib/bch.c kfree(bch->elp); bch 1374 lib/bch.c for (i = 0; i < ARRAY_SIZE(bch->poly_2t); i++) bch 1375 lib/bch.c kfree(bch->poly_2t[i]); bch 1377 lib/bch.c kfree(bch);