Lines Matching full:bch

885 		pr_debug("%s: B%1d CEC %d us\n", hx->ip->name, hx->bch.nr,  in waitforCEC()
888 pr_info("%s: B%1d CEC timeout\n", hx->ip->name, hx->bch.nr); in waitforCEC()
905 pr_debug("%s: B%1d XFW %d us\n", hx->ip->name, hx->bch.nr, in waitforXFW()
908 pr_info("%s: B%1d XFW timeout\n", hx->ip->name, hx->bch.nr); in waitforXFW()
928 pr_debug("%s: B%1d %d\n", hscx->ip->name, hscx->bch.nr, count); in hscx_empty_fifo()
929 if (test_bit(FLG_RX_OFF, &hscx->bch.Flags)) { in hscx_empty_fifo()
930 hscx->bch.dropcnt += count; in hscx_empty_fifo()
934 maxlen = bchannel_get_rxbuf(&hscx->bch, count); in hscx_empty_fifo()
937 if (hscx->bch.rx_skb) in hscx_empty_fifo()
938 skb_trim(hscx->bch.rx_skb, 0); in hscx_empty_fifo()
940 hscx->ip->name, hscx->bch.nr, count); in hscx_empty_fifo()
943 p = skb_put(hscx->bch.rx_skb, count); in hscx_empty_fifo()
954 if (hscx->bch.debug & DEBUG_HW_BFIFO) { in hscx_empty_fifo()
956 hscx->bch.nr, hscx->ip->name, count); in hscx_empty_fifo()
967 if (!hscx->bch.tx_skb) { in hscx_fill_fifo()
968 if (!test_bit(FLG_TX_EMPTY, &hscx->bch.Flags)) in hscx_fill_fifo()
973 memset(p, hscx->bch.fill[0], count); in hscx_fill_fifo()
975 count = hscx->bch.tx_skb->len - hscx->bch.tx_idx; in hscx_fill_fifo()
978 p = hscx->bch.tx_skb->data + hscx->bch.tx_idx; in hscx_fill_fifo()
980 more = test_bit(FLG_TRANSPARENT, &hscx->bch.Flags) ? 1 : 0; in hscx_fill_fifo()
985 pr_debug("%s: B%1d %d/%d/%d\n", hscx->ip->name, hscx->bch.nr, in hscx_fill_fifo()
986 count, hscx->bch.tx_idx, hscx->bch.tx_skb->len); in hscx_fill_fifo()
987 hscx->bch.tx_idx += count; in hscx_fill_fifo()
999 if (hscx->bch.tx_skb && (hscx->bch.debug & DEBUG_HW_BFIFO)) { in hscx_fill_fifo()
1001 hscx->bch.nr, hscx->ip->name, count); in hscx_fill_fifo()
1009 if (hx->bch.tx_skb && hx->bch.tx_idx < hx->bch.tx_skb->len) { in hscx_xpr()
1012 dev_kfree_skb(hx->bch.tx_skb); in hscx_xpr()
1013 if (get_next_bframe(&hx->bch)) { in hscx_xpr()
1015 test_and_clear_bit(FLG_TX_EMPTY, &hx->bch.Flags); in hscx_xpr()
1016 } else if (test_bit(FLG_TX_EMPTY, &hx->bch.Flags)) { in hscx_xpr()
1032 pr_debug("%s: B%1d RSTAB %02x\n", hx->ip->name, hx->bch.nr, rstab); in ipac_rme()
1036 if (hx->bch.debug & DEBUG_HW_BCHANNEL) in ipac_rme()
1038 hx->ip->name, hx->bch.nr); in ipac_rme()
1041 if (hx->bch.debug & DEBUG_HW_BCHANNEL) in ipac_rme()
1043 hx->ip->name, hx->bch.nr, in ipac_rme()
1044 hx->bch.state); in ipac_rme()
1047 if (hx->bch.debug & DEBUG_HW_BCHANNEL) in ipac_rme()
1049 hx->ip->name, hx->bch.nr); in ipac_rme()
1062 if (!hx->bch.rx_skb) in ipac_rme()
1064 if (hx->bch.rx_skb->len < 2) { in ipac_rme()
1066 hx->ip->name, hx->bch.nr, hx->bch.rx_skb->len); in ipac_rme()
1067 skb_trim(hx->bch.rx_skb, 0); in ipac_rme()
1069 skb_trim(hx->bch.rx_skb, hx->bch.rx_skb->len - 1); in ipac_rme()
1070 recv_Bchannel(&hx->bch, 0, false); in ipac_rme()
1083 m = (hx->bch.nr & 1) ? IPAC__EXA : IPAC__EXB; in ipac_irq()
1087 hx->bch.nr, exirb); in ipac_irq()
1089 } else if (hx->bch.nr & 2) { /* HSCX B */ in ipac_irq()
1095 hx->bch.nr, exirb); in ipac_irq()
1103 hx->bch.nr, exirb); in ipac_irq()
1111 pr_debug("%s: B%1d ISTAB %02x\n", hx->ip->name, hx->bch.nr, istab); in ipac_irq()
1113 if (!test_bit(FLG_ACTIVE, &hx->bch.Flags)) in ipac_irq()
1121 if (test_bit(FLG_TRANSPARENT, &hx->bch.Flags)) in ipac_irq()
1122 recv_Bchannel(&hx->bch, 0, false); in ipac_irq()
1126 pr_debug("%s: B%1d RFO error\n", hx->ip->name, hx->bch.nr); in ipac_irq()
1134 if (test_bit(FLG_TRANSPARENT, &hx->bch.Flags)) { in ipac_irq()
1135 if (test_bit(FLG_FILLEMPTY, &hx->bch.Flags)) in ipac_irq()
1136 test_and_set_bit(FLG_TX_EMPTY, &hx->bch.Flags); in ipac_irq()
1141 hx->bch.nr, hx->bch.tx_idx); in ipac_irq()
1142 hx->bch.tx_idx = 0; in ipac_irq()
1215 '@' + hscx->bch.nr, hscx->bch.state, bprotocol, hscx->bch.nr); in hscx_mode()
1217 if (hscx->bch.nr & 1) { /* B1 and ICA */ in hscx_mode()
1230 test_and_clear_bit(FLG_HDLC, &hscx->bch.Flags); in hscx_mode()
1231 test_and_clear_bit(FLG_TRANSPARENT, &hscx->bch.Flags); in hscx_mode()
1238 test_and_set_bit(FLG_TRANSPARENT, &hscx->bch.Flags); in hscx_mode()
1245 test_and_set_bit(FLG_HDLC, &hscx->bch.Flags); in hscx_mode()
1266 test_and_clear_bit(FLG_HDLC, &hscx->bch.Flags); in hscx_mode()
1267 test_and_clear_bit(FLG_TRANSPARENT, &hscx->bch.Flags); in hscx_mode()
1274 test_and_set_bit(FLG_TRANSPARENT, &hscx->bch.Flags); in hscx_mode()
1281 test_and_set_bit(FLG_HDLC, &hscx->bch.Flags); in hscx_mode()
1302 test_and_clear_bit(FLG_HDLC, &hscx->bch.Flags); in hscx_mode()
1303 test_and_clear_bit(FLG_TRANSPARENT, &hscx->bch.Flags); in hscx_mode()
1310 test_and_set_bit(FLG_TRANSPARENT, &hscx->bch.Flags); in hscx_mode()
1317 test_and_set_bit(FLG_HDLC, &hscx->bch.Flags); in hscx_mode()
1326 hscx->bch.state = bprotocol; in hscx_mode()
1333 struct bchannel *bch = container_of(ch, struct bchannel, ch); in hscx_l2l1() local
1334 struct hscx_hw *hx = container_of(bch, struct hscx_hw, bch); in hscx_l2l1()
1342 ret = bchannel_senddata(bch, skb); in hscx_l2l1()
1351 if (!test_and_set_bit(FLG_ACTIVE, &bch->Flags)) in hscx_l2l1()
1362 mISDN_clear_bchannel(bch); in hscx_l2l1()
1380 channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq) in channel_bctrl() argument
1382 return mISDN_ctrl_bchannel(bch, cq); in channel_bctrl()
1388 struct bchannel *bch = container_of(ch, struct bchannel, ch); in hscx_bctrl() local
1389 struct hscx_hw *hx = container_of(bch, struct hscx_hw, bch); in hscx_bctrl()
1396 test_and_clear_bit(FLG_OPEN, &bch->Flags); in hscx_bctrl()
1397 cancel_work_sync(&bch->workq); in hscx_bctrl()
1399 mISDN_clear_bchannel(bch); in hscx_bctrl()
1408 ret = channel_bctrl(bch, arg); in hscx_bctrl()
1442 if (hx->bch.debug & DEBUG_HW) in hscx_init()
1471 if (ipac->hscx[0].bch.debug & DEBUG_HW) in ipac_init()
1481 struct bchannel *bch; in open_bchannel() local
1487 bch = &ipac->hscx[rq->adr.channel - 1].bch; in open_bchannel()
1488 if (test_and_set_bit(FLG_OPEN, &bch->Flags)) in open_bchannel()
1490 test_and_clear_bit(FLG_FILLEMPTY, &bch->Flags); in open_bchannel()
1491 bch->ch.protocol = rq->protocol; in open_bchannel()
1492 rq->ch = &bch->ch; in open_bchannel()
1597 ipac->hscx[i].bch.nr = i + 1; in mISDNipac_init()
1599 list_add(&ipac->hscx[i].bch.ch.list, in mISDNipac_init()
1601 mISDN_initbchannel(&ipac->hscx[i].bch, MAX_DATA_MEM, in mISDNipac_init()
1603 ipac->hscx[i].bch.ch.nr = i + 1; in mISDNipac_init()
1604 ipac->hscx[i].bch.ch.send = &hscx_l2l1; in mISDNipac_init()
1605 ipac->hscx[i].bch.ch.ctrl = hscx_bctrl; in mISDNipac_init()
1606 ipac->hscx[i].bch.hw = hw; in mISDNipac_init()