Lines Matching refs:eni_vcc

315 	struct eni_vcc *eni_vcc;  in rx_ident_err()  local
323 eni_vcc = ENI_VCC(vcc); in rx_ident_err()
327 eni_vcc->rxing,eni_vcc->words); in rx_ident_err()
329 "0x%x\n",eni_vcc->descr,eni_vcc->rx_pos, in rx_ident_err()
330 (unsigned) readl(eni_vcc->recv+eni_vcc->descr*4)); in rx_ident_err()
331 printk(KERN_ALERT " last %p, servicing %d\n",eni_vcc->last, in rx_ident_err()
332 eni_vcc->servicing); in rx_ident_err()
346 struct eni_vcc *eni_vcc; in do_rx_dma() local
354 eni_vcc = ENI_VCC(vcc); in do_rx_dma()
372 here = (eni_vcc->descr+skip) & (eni_vcc->words-1); in do_rx_dma()
377 here = (eni_vcc->descr+size+skip) & (eni_vcc->words-1); in do_rx_dma()
473 ENI_PRV_POS(skb) = eni_vcc->descr+size+1; in do_rx_dma()
475 eni_vcc->last = skb; in do_rx_dma()
478 eni_vcc->descr = here; in do_rx_dma()
494 struct eni_vcc *eni_vcc; in discard() local
496 eni_vcc = ENI_VCC(vcc); in discard()
500 if (eni_vcc->rxing) ENI_PRV_POS(eni_vcc->last) += size+1; in discard()
501 else eni_vcc->rx_pos = (eni_vcc->rx_pos+size+1) & (eni_vcc->words-1); in discard()
512 struct eni_vcc *eni_vcc; in rx_aal0() local
518 eni_vcc = ENI_VCC(vcc); in rx_aal0()
519 descr = readl(eni_vcc->recv+eni_vcc->descr*4); in rx_aal0()
539 skb->tstamp = eni_vcc->timestamp; in rx_aal0()
542 eni_vcc->rxing++; in rx_aal0()
549 struct eni_vcc *eni_vcc; in rx_aal5() local
556 eni_vcc = ENI_VCC(vcc); in rx_aal5()
557 descr = readl(eni_vcc->recv+eni_vcc->descr*4); in rx_aal5()
588 length = readl(eni_vcc->recv+(((eni_vcc->descr+size-1) & in rx_aal5()
589 (eni_vcc->words-1)))*4) & 0xffff; in rx_aal5()
611 eni_vcc->rxing++; in rx_aal5()
620 struct eni_vcc *eni_vcc; in rx_vcc() local
622 eni_vcc = ENI_VCC(vcc); in rx_vcc()
625 while (eni_vcc->descr != (tmp = (readl(vci_dsc+4) & MID_VCI_DESCR) >> in rx_vcc()
628 eni_vcc->descr,tmp); in rx_vcc()
645 eni_vcc->descr,tmp); in rx_vcc()
727 struct eni_vcc *eni_vcc; in dequeue_rx() local
749 eni_vcc = ENI_VCC(vcc); in dequeue_rx()
752 if (!EEPMOK(eni_vcc->rx_pos,ENI_PRV_SIZE(skb), in dequeue_rx()
754 eni_vcc->words)) { in dequeue_rx()
759 eni_vcc->rxing--; in dequeue_rx()
760 eni_vcc->rx_pos = ENI_PRV_POS(skb) & (eni_vcc->words-1); in dequeue_rx()
782 struct eni_vcc *eni_vcc; in open_rx_first() local
787 eni_vcc = ENI_VCC(vcc); in open_rx_first()
788 eni_vcc->rx = NULL; in open_rx_first()
794 eni_vcc->recv = eni_alloc_mem(eni_dev,&size); in open_rx_first()
795 DPRINTK("rx at 0x%lx\n",eni_vcc->recv); in open_rx_first()
796 eni_vcc->words = size >> 2; in open_rx_first()
797 if (!eni_vcc->recv) return -ENOBUFS; in open_rx_first()
798 eni_vcc->rx = vcc->qos.aal == ATM_AAL5 ? rx_aal5 : rx_aal0; in open_rx_first()
799 eni_vcc->descr = 0; in open_rx_first()
800 eni_vcc->rx_pos = 0; in open_rx_first()
801 eni_vcc->rxing = 0; in open_rx_first()
802 eni_vcc->servicing = 0; in open_rx_first()
803 eni_vcc->next = ENI_VCC_NOS; in open_rx_first()
812 struct eni_vcc *eni_vcc; in open_rx_second() local
818 eni_vcc = ENI_VCC(vcc); in open_rx_second()
819 if (!eni_vcc->rx) return 0; in open_rx_second()
822 DPRINTK("loc 0x%x\n",(unsigned) (eni_vcc->recv-eni_dev->ram)/4); in open_rx_second()
823 size = eni_vcc->words >> 8; in open_rx_second()
833 (((eni_vcc->recv-eni_dev->ram) >> (MID_LOC_SKIP+2)) << in open_rx_second()
844 struct eni_vcc *eni_vcc; in close_rx() local
846 eni_vcc = ENI_VCC(vcc); in close_rx()
847 if (!eni_vcc->rx) return; in close_rx()
868 if (!eni_vcc->servicing) { in close_rx()
870 if (!eni_vcc->rxing) break; in close_rx()
872 EVENT("drain PDUs (rx %ld, serv %ld)\n",eni_vcc->rxing, in close_rx()
873 eni_vcc->servicing); in close_rx()
874 printk(KERN_INFO "%d+%d RX left\n",eni_vcc->servicing, in close_rx()
875 eni_vcc->rxing); in close_rx()
885 at_end = eni_vcc->rx_pos == tmp >> MID_VCI_READ_SHIFT; in close_rx()
889 eni_vcc->rx_pos,tmp); in close_rx()
891 eni_vcc->rx_pos,tmp); in close_rx()
898 eni_free_mem(eni_dev,eni_vcc->recv,eni_vcc->words << 2); in close_rx()
899 eni_vcc->rx = NULL; in close_rx()
1035 struct eni_vcc *eni_vcc; in do_tx() local
1049 eni_vcc = ENI_VCC(vcc); in do_tx()
1050 tx = eni_vcc->tx; in do_tx()
1291 struct eni_vcc *eni_vcc = ENI_VCC(vcc); in reserve_or_set_tx() local
1311 eni_vcc->tx = eni_dev->ubr; in reserve_or_set_tx()
1317 new_tx = !eni_vcc->tx; in reserve_or_set_tx()
1319 if (!new_tx) tx = eni_vcc->tx; in reserve_or_set_tx()
1369 if (set_shp) eni_vcc->tx = tx; in reserve_or_set_tx()
1394 struct eni_vcc *eni_vcc; in close_tx() local
1396 eni_vcc = ENI_VCC(vcc); in close_tx()
1397 if (!eni_vcc->tx) return; in close_tx()
1407 txing = skb_peek(&eni_vcc->tx->backlog) || eni_vcc->txing; in close_tx()
1410 DPRINTK("%d TX left\n",eni_vcc->txing); in close_tx()
1416 if (eni_vcc->tx != eni_dev->ubr) { in close_tx()
1422 while (eni_in(MID_TX_RDPTR(eni_vcc->tx->index)) != in close_tx()
1423 eni_in(MID_TX_DESCRSTART(eni_vcc->tx->index))) in close_tx()
1425 eni_free_mem(eni_dev,eni_vcc->tx->send,eni_vcc->tx->words << 2); in close_tx()
1426 eni_vcc->tx->send = NULL; in close_tx()
1427 eni_dev->tx_bw += eni_vcc->tx->reserved; in close_tx()
1429 eni_vcc->tx = NULL; in close_tx()
1911 struct eni_vcc *eni_vcc; in eni_open() local
1927 eni_vcc = kmalloc(sizeof(struct eni_vcc),GFP_KERNEL); in eni_open()
1928 if (!eni_vcc) return -ENOMEM; in eni_open()
1929 vcc->dev_data = eni_vcc; in eni_open()
1930 eni_vcc->tx = NULL; /* for eni_close after open_rx */ in eni_open()
2177 struct eni_vcc *eni_vcc; in eni_proc_read() local
2183 eni_vcc = ENI_VCC(vcc); in eni_proc_read()
2186 if (eni_vcc->rx) { in eni_proc_read()
2189 (unsigned long) (eni_vcc->recv - eni_dev->ram), in eni_proc_read()
2190 eni_vcc->recv-eni_dev->ram+eni_vcc->words*4-1, in eni_proc_read()
2191 eni_vcc->words*4); in eni_proc_read()
2192 if (eni_vcc->tx) length += sprintf(page+length,", "); in eni_proc_read()
2194 if (eni_vcc->tx) in eni_proc_read()
2196 eni_vcc->tx->index,eni_vcc->txing); in eni_proc_read()