Lines Matching refs:tiger

81 		if (p > bcs->hw.tiger.s_end)  in fill_mem()
82 p = bcs->hw.tiger.send; in fill_mem()
99 fill_mem(bcs, bcs->hw.tiger.send, in mode_tiger()
103 bcs->hw.tiger.r_tot, bcs->hw.tiger.r_err, in mode_tiger()
104 bcs->hw.tiger.s_tot); in mode_tiger()
126 fill_mem(bcs, bcs->hw.tiger.send, in mode_tiger()
128 bcs->hw.tiger.r_state = HDLC_ZERO_SEARCH; in mode_tiger()
129 bcs->hw.tiger.r_tot = 0; in mode_tiger()
130 bcs->hw.tiger.r_bitcnt = 0; in mode_tiger()
131 bcs->hw.tiger.r_one = 0; in mode_tiger()
132 bcs->hw.tiger.r_err = 0; in mode_tiger()
133 bcs->hw.tiger.s_tot = 0; in mode_tiger()
135 fill_mem(bcs, bcs->hw.tiger.send, in mode_tiger()
143 bcs->hw.tiger.sendp = bcs->hw.tiger.send; in mode_tiger()
144 bcs->hw.tiger.free = NETJET_DMA_TXSIZE; in mode_tiger()
200 bcs->hw.tiger.sendbuf[s_cnt++] = s_val; \
210 bcs->hw.tiger.sendbuf[s_cnt++] = s_val; \
230 bcs->hw.tiger.sendbuf[s_cnt++] = HDLC_FLAG_VALUE; in make_raw_data()
251 bcs->hw.tiger.sendbuf[s_cnt++] = s_val; in make_raw_data()
264 bcs->hw.tiger.sendbuf[s_cnt++] = s_val; in make_raw_data()
265 bcs->hw.tiger.sendbuf[s_cnt++] = 0xff; // NJ<->NJ thoughput bug fix in make_raw_data()
267 bcs->hw.tiger.sendcnt = s_cnt; in make_raw_data()
269 bcs->hw.tiger.sp = bcs->hw.tiger.sendbuf; in make_raw_data()
288 bcs->hw.tiger.sendbuf[s_cnt++] = s_val; \
300 bcs->hw.tiger.sendbuf[s_cnt++] = s_val; \
331 bcs->hw.tiger.sendbuf[s_cnt++] = s_val; in make_raw_data_56k()
358 bcs->hw.tiger.sendbuf[s_cnt++] = s_val; in make_raw_data_56k()
371 bcs->hw.tiger.sendbuf[s_cnt++] = s_val; in make_raw_data_56k()
372 bcs->hw.tiger.sendbuf[s_cnt++] = 0xff; // NJ<->NJ thoughput bug fix in make_raw_data_56k()
374 bcs->hw.tiger.sendcnt = s_cnt; in make_raw_data_56k()
376 bcs->hw.tiger.sp = bcs->hw.tiger.sendbuf; in make_raw_data_56k()
386 skb_put_data(skb, bcs->hw.tiger.rcvbuf, count); in got_frame()
393 printframe(bcs->cs, bcs->hw.tiger.rcvbuf, count, "rec"); in got_frame()
402 u_int *pend = bcs->hw.tiger.rec + NETJET_DMA_RXSIZE - 1; in read_raw()
403 register u_char state = bcs->hw.tiger.r_state; in read_raw()
404 register u_char r_one = bcs->hw.tiger.r_one; in read_raw()
405 register u_char r_val = bcs->hw.tiger.r_val; in read_raw()
406 register u_int bitcnt = bcs->hw.tiger.r_bitcnt; in read_raw()
423 p = bcs->hw.tiger.rec; in read_raw()
426 bcs->hw.tiger.r_tot++; in read_raw()
440 bcs->hw.tiger.r_tot, i, j, val); in read_raw()
455 bcs->hw.tiger.r_tot, i, j, val); in read_raw()
486 bcs->hw.tiger.r_fcs = PPP_INITFCS; in read_raw()
487 bcs->hw.tiger.rcvbuf[0] = r_val; in read_raw()
488 bcs->hw.tiger.r_fcs = PPP_FCS(bcs->hw.tiger.r_fcs, r_val); in read_raw()
491 bcs->hw.tiger.r_tot, i, j, r_val, val, in read_raw()
513 bcs->hw.tiger.r_err++; in read_raw()
520 i, j, bcs->hw.tiger.r_fcs, bcs->cs->hw.njet.irqstat0); in read_raw()
521 if (bcs->hw.tiger.r_fcs == PPP_GOODFCS) { in read_raw()
526 printframe(bcs->cs, bcs->hw.tiger.rcvbuf, in read_raw()
528 bcs->hw.tiger.r_err++; in read_raw()
554 bcs->hw.tiger.r_err++; in read_raw()
559 bcs->hw.tiger.rcvbuf[(bitcnt >> 3) - 1] = r_val; in read_raw()
560 bcs->hw.tiger.r_fcs = in read_raw()
561 PPP_FCS(bcs->hw.tiger.r_fcs, r_val); in read_raw()
567 bcs->hw.tiger.r_tot++; in read_raw()
569 bcs->hw.tiger.r_state = state; in read_raw()
570 bcs->hw.tiger.r_one = r_one; in read_raw()
571 bcs->hw.tiger.r_val = r_val; in read_raw()
572 bcs->hw.tiger.r_bitcnt = bitcnt; in read_raw()
594 p = cs->bcs[0].hw.tiger.rec + NETJET_DMA_RXSIZE - 1; in read_tiger()
596 p = cs->bcs[0].hw.tiger.rec + cnt - 1; in read_tiger()
631 write_raw(bcs, bcs->hw.tiger.sendp, bcs->hw.tiger.free); in netjet_fill_dma()
634 sp = bcs->hw.tiger.sendp; in netjet_fill_dma()
635 if (p == bcs->hw.tiger.s_end) in netjet_fill_dma()
636 p = bcs->hw.tiger.send - 1; in netjet_fill_dma()
637 if (sp == bcs->hw.tiger.s_end) in netjet_fill_dma()
638 sp = bcs->hw.tiger.send - 1; in netjet_fill_dma()
641 write_raw(bcs, bcs->hw.tiger.sendp, bcs->hw.tiger.free); in netjet_fill_dma()
645 if (p > bcs->hw.tiger.s_end) in netjet_fill_dma()
646 p = bcs->hw.tiger.send; in netjet_fill_dma()
649 if (p > bcs->hw.tiger.s_end) in netjet_fill_dma()
650 p = bcs->hw.tiger.send; in netjet_fill_dma()
651 write_raw(bcs, p, bcs->hw.tiger.free - cnt); in netjet_fill_dma()
655 cnt = bcs->hw.tiger.s_end - p; in netjet_fill_dma()
657 p = bcs->hw.tiger.send + 1; in netjet_fill_dma()
681 if (bcs->hw.tiger.sendcnt > cnt) { in write_raw()
683 bcs->hw.tiger.sendcnt -= cnt; in write_raw()
685 s_cnt = bcs->hw.tiger.sendcnt; in write_raw()
686 bcs->hw.tiger.sendcnt = 0; in write_raw()
693 val = bcs->channel ? ((bcs->hw.tiger.sp[i] << 8) & 0xff00) : in write_raw()
694 (bcs->hw.tiger.sp[i]); in write_raw()
697 if (p > bcs->hw.tiger.s_end) in write_raw()
698 p = bcs->hw.tiger.send; in write_raw()
700 bcs->hw.tiger.s_tot += s_cnt; in write_raw()
704 bcs->hw.tiger.sendcnt, bcs->cs->hw.njet.irqstat0); in write_raw()
706 printframe(bcs->cs, bcs->hw.tiger.sp, s_cnt, "snd"); in write_raw()
707 bcs->hw.tiger.sp += s_cnt; in write_raw()
708 bcs->hw.tiger.sendp = p; in write_raw()
709 if (!bcs->hw.tiger.sendcnt) { in write_raw()
725 bcs->hw.tiger.free = cnt - s_cnt; in write_raw()
726 if (bcs->hw.tiger.free > (NETJET_DMA_TXSIZE / 2)) in write_raw()
739 if (p > bcs->hw.tiger.s_end) in write_raw()
740 p = bcs->hw.tiger.send; in write_raw()
753 bcs->hw.tiger.free += cnt; in write_raw()
782 p = cs->bcs[0].hw.tiger.send + NETJET_DMA_TXSIZE - 1; in write_tiger()
784 p = cs->bcs[0].hw.tiger.send + cnt - 1; in write_tiger()
858 kfree(bcs->hw.tiger.rcvbuf); in close_tigerstate()
859 bcs->hw.tiger.rcvbuf = NULL; in close_tigerstate()
860 kfree(bcs->hw.tiger.sendbuf); in close_tigerstate()
861 bcs->hw.tiger.sendbuf = NULL; in close_tigerstate()
876 if (!(bcs->hw.tiger.rcvbuf = kmalloc(HSCX_BUFMAX, GFP_ATOMIC))) { in open_tigerstate()
881 if (!(bcs->hw.tiger.sendbuf = kmalloc(RAW_BUFMAX, GFP_ATOMIC))) { in open_tigerstate()
890 bcs->hw.tiger.sendcnt = 0; in open_tigerstate()
915 cs->bcs[0].hw.tiger.send = kmalloc_array(NETJET_DMA_TXSIZE, in inittiger()
918 if (!cs->bcs[0].hw.tiger.send) { in inittiger()
923 cs->bcs[0].hw.tiger.s_irq = cs->bcs[0].hw.tiger.send + NETJET_DMA_TXSIZE / 2 - 1; in inittiger()
924 cs->bcs[0].hw.tiger.s_end = cs->bcs[0].hw.tiger.send + NETJET_DMA_TXSIZE - 1; in inittiger()
925 cs->bcs[1].hw.tiger.send = cs->bcs[0].hw.tiger.send; in inittiger()
926 cs->bcs[1].hw.tiger.s_irq = cs->bcs[0].hw.tiger.s_irq; in inittiger()
927 cs->bcs[1].hw.tiger.s_end = cs->bcs[0].hw.tiger.s_end; in inittiger()
929 memset(cs->bcs[0].hw.tiger.send, 0xff, NETJET_DMA_TXSIZE * sizeof(unsigned int)); in inittiger()
930 debugl1(cs, "tiger: send buf %p - %p", cs->bcs[0].hw.tiger.send, in inittiger()
931 cs->bcs[0].hw.tiger.send + NETJET_DMA_TXSIZE - 1); in inittiger()
932 outl(virt_to_bus(cs->bcs[0].hw.tiger.send), in inittiger()
934 outl(virt_to_bus(cs->bcs[0].hw.tiger.s_irq), in inittiger()
936 outl(virt_to_bus(cs->bcs[0].hw.tiger.s_end), in inittiger()
938 cs->bcs[0].hw.tiger.rec = kmalloc_array(NETJET_DMA_RXSIZE, in inittiger()
941 if (!cs->bcs[0].hw.tiger.rec) { in inittiger()
946 debugl1(cs, "tiger: rec buf %p - %p", cs->bcs[0].hw.tiger.rec, in inittiger()
947 cs->bcs[0].hw.tiger.rec + NETJET_DMA_RXSIZE - 1); in inittiger()
948 cs->bcs[1].hw.tiger.rec = cs->bcs[0].hw.tiger.rec; in inittiger()
949 memset(cs->bcs[0].hw.tiger.rec, 0xff, NETJET_DMA_RXSIZE * sizeof(unsigned int)); in inittiger()
950 outl(virt_to_bus(cs->bcs[0].hw.tiger.rec), in inittiger()
952 outl(virt_to_bus(cs->bcs[0].hw.tiger.rec + NETJET_DMA_RXSIZE / 2 - 1), in inittiger()
954 outl(virt_to_bus(cs->bcs[0].hw.tiger.rec + NETJET_DMA_RXSIZE - 1), in inittiger()
970 kfree(cs->bcs[0].hw.tiger.send); in releasetiger()
971 cs->bcs[0].hw.tiger.send = NULL; in releasetiger()
972 cs->bcs[1].hw.tiger.send = NULL; in releasetiger()
973 kfree(cs->bcs[0].hw.tiger.rec); in releasetiger()
974 cs->bcs[0].hw.tiger.rec = NULL; in releasetiger()
975 cs->bcs[1].hw.tiger.rec = NULL; in releasetiger()