Lines Matching refs:l1p

137 	struct hfc4s8s_l1 *l1p;  member
384 struct hfc4s8s_l1 *l1 = bch->l1p; in bch_l2l1()
632 rx_d_frame(struct hfc4s8s_l1 *l1p, int ech) in rx_d_frame() argument
640 if (!l1p->enabled) in rx_d_frame()
644 Write_hfc8(l1p->hw, R_FIFO, in rx_d_frame()
645 (l1p->st_num * 8 + ((ech) ? 7 : 5))); in rx_d_frame()
646 wait_busy(l1p->hw); in rx_d_frame()
648 f1 = Read_hfc8_stable(l1p->hw, A_F1); in rx_d_frame()
649 f2 = Read_hfc8(l1p->hw, A_F2); in rx_d_frame()
659 z1 = Read_hfc16_stable(l1p->hw, A_Z1); in rx_d_frame()
660 z2 = Read_hfc16(l1p->hw, A_Z2); in rx_d_frame()
670 Write_hfc8(l1p->hw, A_INC_RES_FIFO, 2); in rx_d_frame()
671 wait_busy(l1p->hw); in rx_d_frame()
681 Write_hfc8(l1p->hw, A_INC_RES_FIFO, 2); in rx_d_frame()
682 wait_busy(l1p->hw); in rx_d_frame()
686 SetRegAddr(l1p->hw, A_FIFO_DATA0); in rx_d_frame()
689 fRead_hfc32(l1p->hw); in rx_d_frame()
694 fRead_hfc8(l1p->hw); in rx_d_frame()
696 Write_hfc8(l1p->hw, A_INC_RES_FIFO, 1); in rx_d_frame()
697 wait_busy(l1p->hw); in rx_d_frame()
704 SetRegAddr(l1p->hw, A_FIFO_DATA0); in rx_d_frame()
707 *((unsigned long *) cp) = fRead_hfc32(l1p->hw); in rx_d_frame()
713 *cp++ = fRead_hfc8(l1p->hw); in rx_d_frame()
715 Write_hfc8(l1p->hw, A_INC_RES_FIFO, 1); /* increment f counter */ in rx_d_frame()
716 wait_busy(l1p->hw); in rx_d_frame()
723 l1p->d_if.ifc.l1l2(&l1p->d_if.ifc, in rx_d_frame()
727 l1p->d_if.ifc.l1l2(&l1p->d_if.ifc, in rx_d_frame()
742 struct hfc4s8s_l1 *l1 = bch->l1p; in rx_b_frame()
839 tx_d_frame(struct hfc4s8s_l1 *l1p) in tx_d_frame() argument
846 if (l1p->l1_state != 7) in tx_d_frame()
850 Write_hfc8(l1p->hw, R_FIFO, (l1p->st_num * 8 + 4)); in tx_d_frame()
851 wait_busy(l1p->hw); in tx_d_frame()
853 f1 = Read_hfc8(l1p->hw, A_F1); in tx_d_frame()
854 f2 = Read_hfc8_stable(l1p->hw, A_F2); in tx_d_frame()
859 if (l1p->tx_cnt > 0) { in tx_d_frame()
860 cnt = l1p->tx_cnt; in tx_d_frame()
861 l1p->tx_cnt = 0; in tx_d_frame()
862 l1p->d_if.ifc.l1l2(&l1p->d_if.ifc, PH_DATA | CONFIRM, in tx_d_frame()
866 if ((skb = skb_dequeue(&l1p->d_tx_queue))) { in tx_d_frame()
869 SetRegAddr(l1p->hw, A_FIFO_DATA0); in tx_d_frame()
872 SetRegAddr(l1p->hw, A_FIFO_DATA0); in tx_d_frame()
873 fWrite_hfc32(l1p->hw, *(unsigned long *) cp); in tx_d_frame()
879 fWrite_hfc8(l1p->hw, *cp++); in tx_d_frame()
881 l1p->tx_cnt = skb->truesize; in tx_d_frame()
882 Write_hfc8(l1p->hw, A_INC_RES_FIFO, 1); /* increment f counter */ in tx_d_frame()
883 wait_busy(l1p->hw); in tx_d_frame()
896 struct hfc4s8s_l1 *l1 = bch->l1p; in tx_b_frame()
994 struct hfc4s8s_l1 *l1p; in hfc4s8s_bh() local
1000 l1p = hw->l1; in hfc4s8s_bh()
1005 if (l1p->enabled) { in hfc4s8s_bh()
1006 if (l1p->nt_mode) { in hfc4s8s_bh()
1007 u_char oldstate = l1p->l1_state; in hfc4s8s_bh()
1009 Write_hfc8(l1p->hw, R_ST_SEL, in hfc4s8s_bh()
1010 l1p->st_num); in hfc4s8s_bh()
1011 l1p->l1_state = in hfc4s8s_bh()
1012 Read_hfc8(l1p->hw, in hfc4s8s_bh()
1016 && (l1p->l1_state != 3)) in hfc4s8s_bh()
1017 l1p->d_if.ifc.l1l2(&l1p-> in hfc4s8s_bh()
1025 if (l1p->l1_state != 2) { in hfc4s8s_bh()
1026 del_timer(&l1p->l1_timer); in hfc4s8s_bh()
1027 if (l1p->l1_state == 3) { in hfc4s8s_bh()
1028 l1p->d_if.ifc. in hfc4s8s_bh()
1029 l1l2(&l1p-> in hfc4s8s_bh()
1040 mod_timer(&l1p->l1_timer, in hfc4s8s_bh()
1046 l1p->st_num, oldstate, in hfc4s8s_bh()
1047 l1p->l1_state); in hfc4s8s_bh()
1049 u_char oldstate = l1p->l1_state; in hfc4s8s_bh()
1051 Write_hfc8(l1p->hw, R_ST_SEL, in hfc4s8s_bh()
1052 l1p->st_num); in hfc4s8s_bh()
1053 l1p->l1_state = in hfc4s8s_bh()
1054 Read_hfc8(l1p->hw, in hfc4s8s_bh()
1057 if (((l1p->l1_state == 3) && in hfc4s8s_bh()
1061 (&l1p->l1_timer)) in hfc4s8s_bh()
1062 && (l1p->l1_state == 8))) { in hfc4s8s_bh()
1063 mod_timer(&l1p->l1_timer, in hfc4s8s_bh()
1067 if (l1p->l1_state == 7) { in hfc4s8s_bh()
1068 del_timer(&l1p-> in hfc4s8s_bh()
1070 l1p->d_if.ifc. in hfc4s8s_bh()
1071 l1l2(&l1p-> in hfc4s8s_bh()
1077 tx_d_frame(l1p); in hfc4s8s_bh()
1079 if (l1p->l1_state == 3) { in hfc4s8s_bh()
1081 l1p->d_if. in hfc4s8s_bh()
1084 (&l1p-> in hfc4s8s_bh()
1095 l1p->hw->cardnum, in hfc4s8s_bh()
1096 l1p->st_num, oldstate, in hfc4s8s_bh()
1097 l1p->l1_state); in hfc4s8s_bh()
1102 l1p++; in hfc4s8s_bh()
1108 l1p = hw->l1; in hfc4s8s_bh()
1115 hw->mr.fifo_slow_timer_service[l1p-> in hfc4s8s_bh()
1124 if (!l1p->nt_mode) { in hfc4s8s_bh()
1128 rx_d_frame(l1p, 0); in hfc4s8s_bh()
1133 rx_d_frame(l1p, 1); in hfc4s8s_bh()
1138 tx_d_frame(l1p); in hfc4s8s_bh()
1144 rx_b_frame(l1p->b_ch); in hfc4s8s_bh()
1149 tx_b_frame(l1p->b_ch); in hfc4s8s_bh()
1154 rx_b_frame(l1p->b_ch + 1); in hfc4s8s_bh()
1159 tx_b_frame(l1p->b_ch + 1); in hfc4s8s_bh()
1163 l1p++; in hfc4s8s_bh()
1395 struct hfc4s8s_l1 *l1p; in setup_instance() local
1397 l1p = hw->l1 + i; in setup_instance()
1398 spin_lock_init(&l1p->lock); in setup_instance()
1399 l1p->hw = hw; in setup_instance()
1400 timer_setup(&l1p->l1_timer, hfc_l1_timer, 0); in setup_instance()
1401 l1p->st_num = i; in setup_instance()
1402 skb_queue_head_init(&l1p->d_tx_queue); in setup_instance()
1403 l1p->d_if.ifc.priv = hw->l1 + i; in setup_instance()
1404 l1p->d_if.ifc.l2l1 = (void *) dch_l2l1; in setup_instance()
1406 spin_lock_init(&l1p->b_ch[0].lock); in setup_instance()
1407 l1p->b_ch[0].b_if.ifc.l2l1 = (void *) bch_l2l1; in setup_instance()
1408 l1p->b_ch[0].b_if.ifc.priv = (void *) &l1p->b_ch[0]; in setup_instance()
1409 l1p->b_ch[0].l1p = hw->l1 + i; in setup_instance()
1410 l1p->b_ch[0].bchan = 1; in setup_instance()
1411 l1p->b_table[0] = &l1p->b_ch[0].b_if; in setup_instance()
1412 skb_queue_head_init(&l1p->b_ch[0].tx_queue); in setup_instance()
1414 spin_lock_init(&l1p->b_ch[1].lock); in setup_instance()
1415 l1p->b_ch[1].b_if.ifc.l2l1 = (void *) bch_l2l1; in setup_instance()
1416 l1p->b_ch[1].b_if.ifc.priv = (void *) &l1p->b_ch[1]; in setup_instance()
1417 l1p->b_ch[1].l1p = hw->l1 + i; in setup_instance()
1418 l1p->b_ch[1].bchan = 2; in setup_instance()
1419 l1p->b_table[1] = &l1p->b_ch[1].b_if; in setup_instance()
1420 skb_queue_head_init(&l1p->b_ch[1].tx_queue); in setup_instance()