Lines Matching full:bch
886 pr_debug("%s: B%1d CEC %d us\n", hx->ip->name, hx->bch.nr, in waitforCEC()
889 pr_info("%s: B%1d CEC timeout\n", hx->ip->name, hx->bch.nr); in waitforCEC()
906 pr_debug("%s: B%1d XFW %d us\n", hx->ip->name, hx->bch.nr, in waitforXFW()
909 pr_info("%s: B%1d XFW timeout\n", hx->ip->name, hx->bch.nr); in waitforXFW()
929 pr_debug("%s: B%1d %d\n", hscx->ip->name, hscx->bch.nr, count); in hscx_empty_fifo()
930 if (test_bit(FLG_RX_OFF, &hscx->bch.Flags)) { in hscx_empty_fifo()
931 hscx->bch.dropcnt += count; in hscx_empty_fifo()
935 maxlen = bchannel_get_rxbuf(&hscx->bch, count); in hscx_empty_fifo()
938 if (hscx->bch.rx_skb) in hscx_empty_fifo()
939 skb_trim(hscx->bch.rx_skb, 0); in hscx_empty_fifo()
941 hscx->ip->name, hscx->bch.nr, count); in hscx_empty_fifo()
944 p = skb_put(hscx->bch.rx_skb, count); in hscx_empty_fifo()
955 if (hscx->bch.debug & DEBUG_HW_BFIFO) { in hscx_empty_fifo()
957 hscx->bch.nr, hscx->ip->name, count); in hscx_empty_fifo()
968 if (!hscx->bch.tx_skb) { in hscx_fill_fifo()
969 if (!test_bit(FLG_TX_EMPTY, &hscx->bch.Flags)) in hscx_fill_fifo()
974 memset(p, hscx->bch.fill[0], count); in hscx_fill_fifo()
976 count = hscx->bch.tx_skb->len - hscx->bch.tx_idx; in hscx_fill_fifo()
979 p = hscx->bch.tx_skb->data + hscx->bch.tx_idx; in hscx_fill_fifo()
981 more = test_bit(FLG_TRANSPARENT, &hscx->bch.Flags) ? 1 : 0; in hscx_fill_fifo()
986 pr_debug("%s: B%1d %d/%d/%d\n", hscx->ip->name, hscx->bch.nr, in hscx_fill_fifo()
987 count, hscx->bch.tx_idx, hscx->bch.tx_skb->len); in hscx_fill_fifo()
988 hscx->bch.tx_idx += count; in hscx_fill_fifo()
1000 if (hscx->bch.tx_skb && (hscx->bch.debug & DEBUG_HW_BFIFO)) { in hscx_fill_fifo()
1002 hscx->bch.nr, hscx->ip->name, count); in hscx_fill_fifo()
1010 if (hx->bch.tx_skb && hx->bch.tx_idx < hx->bch.tx_skb->len) { in hscx_xpr()
1013 dev_kfree_skb(hx->bch.tx_skb); in hscx_xpr()
1014 if (get_next_bframe(&hx->bch)) { in hscx_xpr()
1016 test_and_clear_bit(FLG_TX_EMPTY, &hx->bch.Flags); in hscx_xpr()
1017 } else if (test_bit(FLG_TX_EMPTY, &hx->bch.Flags)) { in hscx_xpr()
1033 pr_debug("%s: B%1d RSTAB %02x\n", hx->ip->name, hx->bch.nr, rstab); in ipac_rme()
1037 if (hx->bch.debug & DEBUG_HW_BCHANNEL) in ipac_rme()
1039 hx->ip->name, hx->bch.nr); in ipac_rme()
1042 if (hx->bch.debug & DEBUG_HW_BCHANNEL) in ipac_rme()
1044 hx->ip->name, hx->bch.nr, in ipac_rme()
1045 hx->bch.state); in ipac_rme()
1048 if (hx->bch.debug & DEBUG_HW_BCHANNEL) in ipac_rme()
1050 hx->ip->name, hx->bch.nr); in ipac_rme()
1063 if (!hx->bch.rx_skb) in ipac_rme()
1065 if (hx->bch.rx_skb->len < 2) { in ipac_rme()
1067 hx->ip->name, hx->bch.nr, hx->bch.rx_skb->len); in ipac_rme()
1068 skb_trim(hx->bch.rx_skb, 0); in ipac_rme()
1070 skb_trim(hx->bch.rx_skb, hx->bch.rx_skb->len - 1); in ipac_rme()
1071 recv_Bchannel(&hx->bch, 0, false); in ipac_rme()
1084 m = (hx->bch.nr & 1) ? IPAC__EXA : IPAC__EXB; in ipac_irq()
1088 hx->bch.nr, exirb); in ipac_irq()
1090 } else if (hx->bch.nr & 2) { /* HSCX B */ in ipac_irq()
1096 hx->bch.nr, exirb); in ipac_irq()
1104 hx->bch.nr, exirb); in ipac_irq()
1112 pr_debug("%s: B%1d ISTAB %02x\n", hx->ip->name, hx->bch.nr, istab); in ipac_irq()
1114 if (!test_bit(FLG_ACTIVE, &hx->bch.Flags)) in ipac_irq()
1122 if (test_bit(FLG_TRANSPARENT, &hx->bch.Flags)) in ipac_irq()
1123 recv_Bchannel(&hx->bch, 0, false); in ipac_irq()
1127 pr_debug("%s: B%1d RFO error\n", hx->ip->name, hx->bch.nr); in ipac_irq()
1135 if (test_bit(FLG_TRANSPARENT, &hx->bch.Flags)) { in ipac_irq()
1136 if (test_bit(FLG_FILLEMPTY, &hx->bch.Flags)) in ipac_irq()
1137 test_and_set_bit(FLG_TX_EMPTY, &hx->bch.Flags); in ipac_irq()
1142 hx->bch.nr, hx->bch.tx_idx); in ipac_irq()
1143 hx->bch.tx_idx = 0; in ipac_irq()
1216 '@' + hscx->bch.nr, hscx->bch.state, bprotocol, hscx->bch.nr); in hscx_mode()
1218 if (hscx->bch.nr & 1) { /* B1 and ICA */ in hscx_mode()
1231 test_and_clear_bit(FLG_HDLC, &hscx->bch.Flags); in hscx_mode()
1232 test_and_clear_bit(FLG_TRANSPARENT, &hscx->bch.Flags); in hscx_mode()
1239 test_and_set_bit(FLG_TRANSPARENT, &hscx->bch.Flags); in hscx_mode()
1246 test_and_set_bit(FLG_HDLC, &hscx->bch.Flags); in hscx_mode()
1267 test_and_clear_bit(FLG_HDLC, &hscx->bch.Flags); in hscx_mode()
1268 test_and_clear_bit(FLG_TRANSPARENT, &hscx->bch.Flags); in hscx_mode()
1275 test_and_set_bit(FLG_TRANSPARENT, &hscx->bch.Flags); in hscx_mode()
1282 test_and_set_bit(FLG_HDLC, &hscx->bch.Flags); in hscx_mode()
1303 test_and_clear_bit(FLG_HDLC, &hscx->bch.Flags); in hscx_mode()
1304 test_and_clear_bit(FLG_TRANSPARENT, &hscx->bch.Flags); in hscx_mode()
1311 test_and_set_bit(FLG_TRANSPARENT, &hscx->bch.Flags); in hscx_mode()
1318 test_and_set_bit(FLG_HDLC, &hscx->bch.Flags); in hscx_mode()
1327 hscx->bch.state = bprotocol; in hscx_mode()
1334 struct bchannel *bch = container_of(ch, struct bchannel, ch); in hscx_l2l1() local
1335 struct hscx_hw *hx = container_of(bch, struct hscx_hw, bch); in hscx_l2l1()
1343 ret = bchannel_senddata(bch, skb); in hscx_l2l1()
1352 if (!test_and_set_bit(FLG_ACTIVE, &bch->Flags)) in hscx_l2l1()
1363 mISDN_clear_bchannel(bch); in hscx_l2l1()
1381 channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq) in channel_bctrl() argument
1383 return mISDN_ctrl_bchannel(bch, cq); in channel_bctrl()
1389 struct bchannel *bch = container_of(ch, struct bchannel, ch); in hscx_bctrl() local
1390 struct hscx_hw *hx = container_of(bch, struct hscx_hw, bch); in hscx_bctrl()
1397 test_and_clear_bit(FLG_OPEN, &bch->Flags); in hscx_bctrl()
1398 cancel_work_sync(&bch->workq); in hscx_bctrl()
1400 mISDN_clear_bchannel(bch); in hscx_bctrl()
1409 ret = channel_bctrl(bch, arg); in hscx_bctrl()
1443 if (hx->bch.debug & DEBUG_HW) in hscx_init()
1472 if (ipac->hscx[0].bch.debug & DEBUG_HW) in ipac_init()
1482 struct bchannel *bch; in open_bchannel() local
1488 bch = &ipac->hscx[rq->adr.channel - 1].bch; in open_bchannel()
1489 if (test_and_set_bit(FLG_OPEN, &bch->Flags)) in open_bchannel()
1491 test_and_clear_bit(FLG_FILLEMPTY, &bch->Flags); in open_bchannel()
1492 bch->ch.protocol = rq->protocol; in open_bchannel()
1493 rq->ch = &bch->ch; in open_bchannel()
1598 ipac->hscx[i].bch.nr = i + 1; in mISDNipac_init()
1600 list_add(&ipac->hscx[i].bch.ch.list, in mISDNipac_init()
1602 mISDN_initbchannel(&ipac->hscx[i].bch, MAX_DATA_MEM, in mISDNipac_init()
1604 ipac->hscx[i].bch.ch.nr = i + 1; in mISDNipac_init()
1605 ipac->hscx[i].bch.ch.send = &hscx_l2l1; in mISDNipac_init()
1606 ipac->hscx[i].bch.ch.ctrl = hscx_bctrl; in mISDNipac_init()
1607 ipac->hscx[i].bch.hw = hw; in mISDNipac_init()