Lines Matching refs:eni_vcc
317 struct eni_vcc *eni_vcc; in rx_ident_err() local
325 eni_vcc = ENI_VCC(vcc); in rx_ident_err()
329 eni_vcc->rxing,eni_vcc->words); in rx_ident_err()
331 "0x%x\n",eni_vcc->descr,eni_vcc->rx_pos, in rx_ident_err()
332 (unsigned) readl(eni_vcc->recv+eni_vcc->descr*4)); in rx_ident_err()
333 printk(KERN_ALERT " last %p, servicing %d\n",eni_vcc->last, in rx_ident_err()
334 eni_vcc->servicing); in rx_ident_err()
348 struct eni_vcc *eni_vcc; in do_rx_dma() local
356 eni_vcc = ENI_VCC(vcc); in do_rx_dma()
374 here = (eni_vcc->descr+skip) & (eni_vcc->words-1); in do_rx_dma()
379 here = (eni_vcc->descr+size+skip) & (eni_vcc->words-1); in do_rx_dma()
475 ENI_PRV_POS(skb) = eni_vcc->descr+size+1; in do_rx_dma()
477 eni_vcc->last = skb; in do_rx_dma()
480 eni_vcc->descr = here; in do_rx_dma()
496 struct eni_vcc *eni_vcc; in discard() local
498 eni_vcc = ENI_VCC(vcc); in discard()
502 if (eni_vcc->rxing) ENI_PRV_POS(eni_vcc->last) += size+1; in discard()
503 else eni_vcc->rx_pos = (eni_vcc->rx_pos+size+1) & (eni_vcc->words-1); in discard()
514 struct eni_vcc *eni_vcc; in rx_aal0() local
520 eni_vcc = ENI_VCC(vcc); in rx_aal0()
521 descr = readl(eni_vcc->recv+eni_vcc->descr*4); in rx_aal0()
541 skb->tstamp = eni_vcc->timestamp; in rx_aal0()
544 eni_vcc->rxing++; in rx_aal0()
551 struct eni_vcc *eni_vcc; in rx_aal5() local
558 eni_vcc = ENI_VCC(vcc); in rx_aal5()
559 descr = readl(eni_vcc->recv+eni_vcc->descr*4); in rx_aal5()
590 length = readl(eni_vcc->recv+(((eni_vcc->descr+size-1) & in rx_aal5()
591 (eni_vcc->words-1)))*4) & 0xffff; in rx_aal5()
613 eni_vcc->rxing++; in rx_aal5()
622 struct eni_vcc *eni_vcc; in rx_vcc() local
624 eni_vcc = ENI_VCC(vcc); in rx_vcc()
627 while (eni_vcc->descr != (tmp = (readl(vci_dsc+4) & MID_VCI_DESCR) >> in rx_vcc()
630 eni_vcc->descr,tmp); in rx_vcc()
647 eni_vcc->descr,tmp); in rx_vcc()
729 struct eni_vcc *eni_vcc; in dequeue_rx() local
751 eni_vcc = ENI_VCC(vcc); in dequeue_rx()
754 if (!EEPMOK(eni_vcc->rx_pos,ENI_PRV_SIZE(skb), in dequeue_rx()
756 eni_vcc->words)) { in dequeue_rx()
761 eni_vcc->rxing--; in dequeue_rx()
762 eni_vcc->rx_pos = ENI_PRV_POS(skb) & (eni_vcc->words-1); in dequeue_rx()
784 struct eni_vcc *eni_vcc; in open_rx_first() local
789 eni_vcc = ENI_VCC(vcc); in open_rx_first()
790 eni_vcc->rx = NULL; in open_rx_first()
796 eni_vcc->recv = eni_alloc_mem(eni_dev,&size); in open_rx_first()
797 DPRINTK("rx at 0x%lx\n",eni_vcc->recv); in open_rx_first()
798 eni_vcc->words = size >> 2; in open_rx_first()
799 if (!eni_vcc->recv) return -ENOBUFS; in open_rx_first()
800 eni_vcc->rx = vcc->qos.aal == ATM_AAL5 ? rx_aal5 : rx_aal0; in open_rx_first()
801 eni_vcc->descr = 0; in open_rx_first()
802 eni_vcc->rx_pos = 0; in open_rx_first()
803 eni_vcc->rxing = 0; in open_rx_first()
804 eni_vcc->servicing = 0; in open_rx_first()
805 eni_vcc->next = ENI_VCC_NOS; in open_rx_first()
814 struct eni_vcc *eni_vcc; in open_rx_second() local
820 eni_vcc = ENI_VCC(vcc); in open_rx_second()
821 if (!eni_vcc->rx) return 0; in open_rx_second()
824 DPRINTK("loc 0x%x\n",(unsigned) (eni_vcc->recv-eni_dev->ram)/4); in open_rx_second()
825 size = eni_vcc->words >> 8; in open_rx_second()
835 (((eni_vcc->recv-eni_dev->ram) >> (MID_LOC_SKIP+2)) << in open_rx_second()
846 struct eni_vcc *eni_vcc; in close_rx() local
848 eni_vcc = ENI_VCC(vcc); in close_rx()
849 if (!eni_vcc->rx) return; in close_rx()
870 if (!eni_vcc->servicing) { in close_rx()
872 if (!eni_vcc->rxing) break; in close_rx()
874 EVENT("drain PDUs (rx %ld, serv %ld)\n",eni_vcc->rxing, in close_rx()
875 eni_vcc->servicing); in close_rx()
876 printk(KERN_INFO "%d+%d RX left\n",eni_vcc->servicing, in close_rx()
877 eni_vcc->rxing); in close_rx()
887 at_end = eni_vcc->rx_pos == tmp >> MID_VCI_READ_SHIFT; in close_rx()
891 eni_vcc->rx_pos,tmp); in close_rx()
893 eni_vcc->rx_pos,tmp); in close_rx()
900 eni_free_mem(eni_dev,eni_vcc->recv,eni_vcc->words << 2); in close_rx()
901 eni_vcc->rx = NULL; in close_rx()
1037 struct eni_vcc *eni_vcc; in do_tx() local
1051 eni_vcc = ENI_VCC(vcc); in do_tx()
1052 tx = eni_vcc->tx; in do_tx()
1293 struct eni_vcc *eni_vcc = ENI_VCC(vcc); in reserve_or_set_tx() local
1313 eni_vcc->tx = eni_dev->ubr; in reserve_or_set_tx()
1319 new_tx = !eni_vcc->tx; in reserve_or_set_tx()
1321 if (!new_tx) tx = eni_vcc->tx; in reserve_or_set_tx()
1371 if (set_shp) eni_vcc->tx = tx; in reserve_or_set_tx()
1396 struct eni_vcc *eni_vcc; in close_tx() local
1398 eni_vcc = ENI_VCC(vcc); in close_tx()
1399 if (!eni_vcc->tx) return; in close_tx()
1409 txing = skb_peek(&eni_vcc->tx->backlog) || eni_vcc->txing; in close_tx()
1412 DPRINTK("%d TX left\n",eni_vcc->txing); in close_tx()
1418 if (eni_vcc->tx != eni_dev->ubr) { in close_tx()
1424 while (eni_in(MID_TX_RDPTR(eni_vcc->tx->index)) != in close_tx()
1425 eni_in(MID_TX_DESCRSTART(eni_vcc->tx->index))) in close_tx()
1427 eni_free_mem(eni_dev,eni_vcc->tx->send,eni_vcc->tx->words << 2); in close_tx()
1428 eni_vcc->tx->send = NULL; in close_tx()
1429 eni_dev->tx_bw += eni_vcc->tx->reserved; in close_tx()
1431 eni_vcc->tx = NULL; in close_tx()
1914 struct eni_vcc *eni_vcc; in eni_open() local
1930 eni_vcc = kmalloc(sizeof(struct eni_vcc),GFP_KERNEL); in eni_open()
1931 if (!eni_vcc) return -ENOMEM; in eni_open()
1932 vcc->dev_data = eni_vcc; in eni_open()
1933 eni_vcc->tx = NULL; /* for eni_close after open_rx */ in eni_open()
2180 struct eni_vcc *eni_vcc; in eni_proc_read() local
2186 eni_vcc = ENI_VCC(vcc); in eni_proc_read()
2189 if (eni_vcc->rx) { in eni_proc_read()
2192 (unsigned long) (eni_vcc->recv - eni_dev->ram), in eni_proc_read()
2193 eni_vcc->recv-eni_dev->ram+eni_vcc->words*4-1, in eni_proc_read()
2194 eni_vcc->words*4); in eni_proc_read()
2195 if (eni_vcc->tx) length += sprintf(page+length,", "); in eni_proc_read()
2197 if (eni_vcc->tx) in eni_proc_read()
2199 eni_vcc->tx->index,eni_vcc->txing); in eni_proc_read()