Lines Matching defs:bch

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