Lines Matching refs:l1p

137 	struct hfc4s8s_l1 *l1p;  member
384 struct hfc4s8s_l1 *l1 = bch->l1p; in bch_l2l1()
631 rx_d_frame(struct hfc4s8s_l1 *l1p, int ech) in rx_d_frame() argument
639 if (!l1p->enabled) in rx_d_frame()
643 Write_hfc8(l1p->hw, R_FIFO, in rx_d_frame()
644 (l1p->st_num * 8 + ((ech) ? 7 : 5))); in rx_d_frame()
645 wait_busy(l1p->hw); in rx_d_frame()
647 f1 = Read_hfc8_stable(l1p->hw, A_F1); in rx_d_frame()
648 f2 = Read_hfc8(l1p->hw, A_F2); in rx_d_frame()
658 z1 = Read_hfc16_stable(l1p->hw, A_Z1); in rx_d_frame()
659 z2 = Read_hfc16(l1p->hw, A_Z2); in rx_d_frame()
669 Write_hfc8(l1p->hw, A_INC_RES_FIFO, 2); in rx_d_frame()
670 wait_busy(l1p->hw); in rx_d_frame()
680 Write_hfc8(l1p->hw, A_INC_RES_FIFO, 2); in rx_d_frame()
681 wait_busy(l1p->hw); in rx_d_frame()
685 SetRegAddr(l1p->hw, A_FIFO_DATA0); in rx_d_frame()
688 fRead_hfc32(l1p->hw); in rx_d_frame()
693 fRead_hfc8(l1p->hw); in rx_d_frame()
695 Write_hfc8(l1p->hw, A_INC_RES_FIFO, 1); in rx_d_frame()
696 wait_busy(l1p->hw); in rx_d_frame()
703 SetRegAddr(l1p->hw, A_FIFO_DATA0); in rx_d_frame()
706 *((unsigned long *) cp) = fRead_hfc32(l1p->hw); in rx_d_frame()
712 *cp++ = fRead_hfc8(l1p->hw); in rx_d_frame()
714 Write_hfc8(l1p->hw, A_INC_RES_FIFO, 1); /* increment f counter */ in rx_d_frame()
715 wait_busy(l1p->hw); in rx_d_frame()
722 l1p->d_if.ifc.l1l2(&l1p->d_if.ifc, in rx_d_frame()
726 l1p->d_if.ifc.l1l2(&l1p->d_if.ifc, in rx_d_frame()
741 struct hfc4s8s_l1 *l1 = bch->l1p; in rx_b_frame()
838 tx_d_frame(struct hfc4s8s_l1 *l1p) in tx_d_frame() argument
845 if (l1p->l1_state != 7) in tx_d_frame()
849 Write_hfc8(l1p->hw, R_FIFO, (l1p->st_num * 8 + 4)); in tx_d_frame()
850 wait_busy(l1p->hw); in tx_d_frame()
852 f1 = Read_hfc8(l1p->hw, A_F1); in tx_d_frame()
853 f2 = Read_hfc8_stable(l1p->hw, A_F2); in tx_d_frame()
858 if (l1p->tx_cnt > 0) { in tx_d_frame()
859 cnt = l1p->tx_cnt; in tx_d_frame()
860 l1p->tx_cnt = 0; in tx_d_frame()
861 l1p->d_if.ifc.l1l2(&l1p->d_if.ifc, PH_DATA | CONFIRM, in tx_d_frame()
865 if ((skb = skb_dequeue(&l1p->d_tx_queue))) { in tx_d_frame()
868 SetRegAddr(l1p->hw, A_FIFO_DATA0); in tx_d_frame()
871 SetRegAddr(l1p->hw, A_FIFO_DATA0); in tx_d_frame()
872 fWrite_hfc32(l1p->hw, *(unsigned long *) cp); in tx_d_frame()
878 fWrite_hfc8(l1p->hw, *cp++); in tx_d_frame()
880 l1p->tx_cnt = skb->truesize; in tx_d_frame()
881 Write_hfc8(l1p->hw, A_INC_RES_FIFO, 1); /* increment f counter */ in tx_d_frame()
882 wait_busy(l1p->hw); in tx_d_frame()
895 struct hfc4s8s_l1 *l1 = bch->l1p; in tx_b_frame()
993 struct hfc4s8s_l1 *l1p; in hfc4s8s_bh() local
999 l1p = hw->l1; in hfc4s8s_bh()
1004 if (l1p->enabled) { in hfc4s8s_bh()
1005 if (l1p->nt_mode) { in hfc4s8s_bh()
1006 u_char oldstate = l1p->l1_state; in hfc4s8s_bh()
1008 Write_hfc8(l1p->hw, R_ST_SEL, in hfc4s8s_bh()
1009 l1p->st_num); in hfc4s8s_bh()
1010 l1p->l1_state = in hfc4s8s_bh()
1011 Read_hfc8(l1p->hw, in hfc4s8s_bh()
1015 && (l1p->l1_state != 3)) in hfc4s8s_bh()
1016 l1p->d_if.ifc.l1l2(&l1p-> in hfc4s8s_bh()
1024 if (l1p->l1_state != 2) { in hfc4s8s_bh()
1025 del_timer(&l1p->l1_timer); in hfc4s8s_bh()
1026 if (l1p->l1_state == 3) { in hfc4s8s_bh()
1027 l1p->d_if.ifc. in hfc4s8s_bh()
1028 l1l2(&l1p-> in hfc4s8s_bh()
1039 mod_timer(&l1p->l1_timer, in hfc4s8s_bh()
1045 l1p->st_num, oldstate, in hfc4s8s_bh()
1046 l1p->l1_state); in hfc4s8s_bh()
1048 u_char oldstate = l1p->l1_state; in hfc4s8s_bh()
1050 Write_hfc8(l1p->hw, R_ST_SEL, in hfc4s8s_bh()
1051 l1p->st_num); in hfc4s8s_bh()
1052 l1p->l1_state = in hfc4s8s_bh()
1053 Read_hfc8(l1p->hw, in hfc4s8s_bh()
1056 if (((l1p->l1_state == 3) && in hfc4s8s_bh()
1060 (&l1p->l1_timer)) in hfc4s8s_bh()
1061 && (l1p->l1_state == 8))) { in hfc4s8s_bh()
1062 mod_timer(&l1p->l1_timer, in hfc4s8s_bh()
1066 if (l1p->l1_state == 7) { in hfc4s8s_bh()
1067 del_timer(&l1p-> in hfc4s8s_bh()
1069 l1p->d_if.ifc. in hfc4s8s_bh()
1070 l1l2(&l1p-> in hfc4s8s_bh()
1076 tx_d_frame(l1p); in hfc4s8s_bh()
1078 if (l1p->l1_state == 3) { in hfc4s8s_bh()
1080 l1p->d_if. in hfc4s8s_bh()
1083 (&l1p-> in hfc4s8s_bh()
1094 l1p->hw->cardnum, in hfc4s8s_bh()
1095 l1p->st_num, oldstate, in hfc4s8s_bh()
1096 l1p->l1_state); in hfc4s8s_bh()
1101 l1p++; in hfc4s8s_bh()
1107 l1p = hw->l1; in hfc4s8s_bh()
1114 hw->mr.fifo_slow_timer_service[l1p-> in hfc4s8s_bh()
1123 if (!l1p->nt_mode) { in hfc4s8s_bh()
1127 rx_d_frame(l1p, 0); in hfc4s8s_bh()
1132 rx_d_frame(l1p, 1); in hfc4s8s_bh()
1137 tx_d_frame(l1p); in hfc4s8s_bh()
1143 rx_b_frame(l1p->b_ch); in hfc4s8s_bh()
1148 tx_b_frame(l1p->b_ch); in hfc4s8s_bh()
1153 rx_b_frame(l1p->b_ch + 1); in hfc4s8s_bh()
1158 tx_b_frame(l1p->b_ch + 1); in hfc4s8s_bh()
1162 l1p++; in hfc4s8s_bh()
1394 struct hfc4s8s_l1 *l1p; in setup_instance() local
1396 l1p = hw->l1 + i; in setup_instance()
1397 spin_lock_init(&l1p->lock); in setup_instance()
1398 l1p->hw = hw; in setup_instance()
1399 l1p->l1_timer.function = (void *) hfc_l1_timer; in setup_instance()
1400 l1p->l1_timer.data = (long) (l1p); in setup_instance()
1401 init_timer(&l1p->l1_timer); in setup_instance()
1402 l1p->st_num = i; in setup_instance()
1403 skb_queue_head_init(&l1p->d_tx_queue); in setup_instance()
1404 l1p->d_if.ifc.priv = hw->l1 + i; in setup_instance()
1405 l1p->d_if.ifc.l2l1 = (void *) dch_l2l1; in setup_instance()
1407 spin_lock_init(&l1p->b_ch[0].lock); in setup_instance()
1408 l1p->b_ch[0].b_if.ifc.l2l1 = (void *) bch_l2l1; in setup_instance()
1409 l1p->b_ch[0].b_if.ifc.priv = (void *) &l1p->b_ch[0]; in setup_instance()
1410 l1p->b_ch[0].l1p = hw->l1 + i; in setup_instance()
1411 l1p->b_ch[0].bchan = 1; in setup_instance()
1412 l1p->b_table[0] = &l1p->b_ch[0].b_if; in setup_instance()
1413 skb_queue_head_init(&l1p->b_ch[0].tx_queue); in setup_instance()
1415 spin_lock_init(&l1p->b_ch[1].lock); in setup_instance()
1416 l1p->b_ch[1].b_if.ifc.l2l1 = (void *) bch_l2l1; in setup_instance()
1417 l1p->b_ch[1].b_if.ifc.priv = (void *) &l1p->b_ch[1]; in setup_instance()
1418 l1p->b_ch[1].l1p = hw->l1 + i; in setup_instance()
1419 l1p->b_ch[1].bchan = 2; in setup_instance()
1420 l1p->b_table[1] = &l1p->b_ch[1].b_if; in setup_instance()
1421 skb_queue_head_init(&l1p->b_ch[1].tx_queue); in setup_instance()