Lines Matching refs:bch

425 	struct hfc4s8s_btype *bch = ifc->priv;
426 struct hfc4s8s_l1 *l1 = bch->l1p;
434 if (!l1->enabled || (bch->mode == L1_MODE_NULL)) {
439 skb_queue_tail(&bch->tx_queue, skb);
440 if (!bch->tx_skb && (bch->tx_cnt <= 0)) {
442 ((bch->bchan == 1) ? 1 : 4);
465 ((bch->bchan ==
469 ((bch->bchan ==
480 ((bch->bchan ==
491 (bch->bchan & 3);
494 bch->mode = L1_MODE_HDLC;
498 bch->b_if.ifc.l1l2(&bch->b_if.ifc,
511 ((bch->bchan ==
516 ((bch->bchan ==
527 ((bch->bchan ==
538 (bch->bchan & 3);
541 bch->mode = L1_MODE_TRANS;
545 bch->b_if.ifc.l1l2(&bch->b_if.ifc,
552 if (bch->mode == L1_MODE_NULL)
560 ~((bch->bchan ==
566 ~((bch->bchan ==
571 ((bch->bchan ==
578 ((bch->bchan ==
585 ~(bch->bchan & 3);
591 bch->mode = L1_MODE_NULL;
592 bch->b_if.ifc.l1l2(&bch->b_if.ifc,
596 if (bch->tx_skb) {
597 dev_kfree_skb(bch->tx_skb);
598 bch->tx_skb = NULL;
600 if (bch->rx_skb) {
601 dev_kfree_skb(bch->rx_skb);
602 bch->rx_skb = NULL;
604 skb_queue_purge(&bch->tx_queue);
605 bch->tx_cnt = 0;
606 bch->rx_ptr = NULL;
628 bch->b_if.ifc.l1l2(&bch->b_if.ifc,
801 rx_b_frame(struct hfc4s8s_btype *bch)
805 struct hfc4s8s_l1 *l1 = bch->l1p;
808 if (!l1->enabled || (bch->mode == L1_MODE_NULL))
814 (l1->st_num * 8 + ((bch->bchan == 1) ? 1 : 3)));
817 if (bch->mode == L1_MODE_HDLC) {
834 if (!(skb = bch->rx_skb)) {
837 dev_alloc_skb((bch->mode ==
845 bch->rx_ptr = skb->data;
846 bch->rx_skb = skb;
849 skb->len = (bch->rx_ptr - skb->data) + z1;
852 if ((bch->mode == L1_MODE_HDLC) &&
857 bch->rx_ptr = skb->data;
868 *((unsigned long *) bch->rx_ptr) =
871 *((unsigned long *) bch->rx_ptr) =
874 bch->rx_ptr += 4;
880 *(bch->rx_ptr++) = Read_hfc8(l1->hw, A_FIFO_DATA0);
882 *(bch->rx_ptr++) = fRead_hfc8(l1->hw);
891 bch->rx_ptr--;
892 if (*bch->rx_ptr) {
894 bch->rx_ptr = skb->data;
899 if (hdlc_complete || (bch->mode == L1_MODE_TRANS)) {
900 bch->rx_skb = NULL;
901 bch->rx_ptr = NULL;
902 bch->b_if.ifc.l1l2(&bch->b_if.ifc,
979 tx_b_frame(struct hfc4s8s_btype *bch)
982 struct hfc4s8s_l1 *l1 = bch->l1p;
987 if (!l1->enabled || (bch->mode == L1_MODE_NULL))
992 (l1->st_num * 8 + ((bch->bchan == 1) ? 0 : 2)));
996 if (bch->mode == L1_MODE_HDLC) {
1007 if (!(skb = bch->tx_skb)) {
1008 if (!(skb = skb_dequeue(&bch->tx_queue))) {
1011 &= ~((bch->bchan == 1) ? 1 : 4);
1014 bch->tx_skb = skb;
1015 bch->tx_cnt = 0;
1020 ((bch->bchan == 1) ? 1 : 4);
1023 ~((bch->bchan == 1) ? 1 : 4);
1034 cnt = skb->len - bch->tx_cnt;
1037 cp = skb->data + bch->tx_cnt;
1038 bch->tx_cnt += cnt;
1061 if (bch->tx_cnt >= skb->len) {
1062 if (bch->mode == L1_MODE_HDLC) {
1067 bch->tx_skb = NULL;
1068 bch->tx_cnt = 0;
1074 ((bch->bchan == 1) ? 0 : 2)));
1079 bch->b_if.ifc.l1l2((struct hisax_if *) &bch->b_if,