Lines Matching refs:rx

561 	vptr->rx.dirty = vptr->rx.filled = vptr->rx.curr = 0;  in velocity_init_rx_ring_indexes()
583 vptr->rx.ring[i].rdesc0.len |= OWNED_BY_NIC; in velocity_rx_reset()
586 writel(vptr->rx.pool_dma, &regs->RDBaseLo); in velocity_rx_reset()
1410 writel(vptr->rx.pool_dma, &regs->RDBaseLo); in velocity_init_registers()
1455 if (vptr->rx.filled < 4) in velocity_give_many_rx_descs()
1460 unusable = vptr->rx.filled & 0x0003; in velocity_give_many_rx_descs()
1461 dirty = vptr->rx.dirty - unusable; in velocity_give_many_rx_descs()
1462 for (avail = vptr->rx.filled & 0xfffc; avail; avail--) { in velocity_give_many_rx_descs()
1464 vptr->rx.ring[dirty].rdesc0.len |= OWNED_BY_NIC; in velocity_give_many_rx_descs()
1467 writew(vptr->rx.filled & 0xfffc, &regs->RBRDU); in velocity_give_many_rx_descs()
1468 vptr->rx.filled = unusable; in velocity_give_many_rx_descs()
1501 vptr->rx.ring = pool; in velocity_init_dma_rings()
1502 vptr->rx.pool_dma = pool_dma; in velocity_init_dma_rings()
1519 vptr->rx.buf_sz = (mtu <= ETH_DATA_LEN) ? PKT_BUF_SZ : mtu + 32; in velocity_set_rxbufsize()
1534 struct rx_desc *rd = &(vptr->rx.ring[idx]); in velocity_alloc_rx_buf()
1535 struct velocity_rd_info *rd_info = &(vptr->rx.info[idx]); in velocity_alloc_rx_buf()
1537 rd_info->skb = netdev_alloc_skb(vptr->netdev, vptr->rx.buf_sz + 64); in velocity_alloc_rx_buf()
1548 vptr->rx.buf_sz, DMA_FROM_DEVICE); in velocity_alloc_rx_buf()
1555 rd->size = cpu_to_le16(vptr->rx.buf_sz) | RX_INTEN; in velocity_alloc_rx_buf()
1564 int dirty = vptr->rx.dirty, done = 0; in velocity_rx_refill()
1567 struct rx_desc *rd = vptr->rx.ring + dirty; in velocity_rx_refill()
1573 if (!vptr->rx.info[dirty].skb) { in velocity_rx_refill()
1579 } while (dirty != vptr->rx.curr); in velocity_rx_refill()
1582 vptr->rx.dirty = dirty; in velocity_rx_refill()
1583 vptr->rx.filled += done; in velocity_rx_refill()
1600 if (vptr->rx.info == NULL) in velocity_free_rd_ring()
1604 struct velocity_rd_info *rd_info = &(vptr->rx.info[i]); in velocity_free_rd_ring()
1605 struct rx_desc *rd = vptr->rx.ring + i; in velocity_free_rd_ring()
1611 dma_unmap_single(vptr->dev, rd_info->skb_dma, vptr->rx.buf_sz, in velocity_free_rd_ring()
1619 kfree(vptr->rx.info); in velocity_free_rd_ring()
1620 vptr->rx.info = NULL; in velocity_free_rd_ring()
1634 vptr->rx.info = kcalloc(vptr->options.numrx, in velocity_init_rd_ring()
1636 if (!vptr->rx.info) in velocity_init_rd_ring()
1693 dma_free_coherent(vptr->dev, size, vptr->rx.ring, vptr->rx.pool_dma); in velocity_free_dma_rings()
2053 struct velocity_rd_info *rd_info = &(vptr->rx.info[idx]); in velocity_receive_frame()
2054 struct rx_desc *rd = &(vptr->rx.ring[idx]); in velocity_receive_frame()
2070 vptr->rx.buf_sz, DMA_FROM_DEVICE); in velocity_receive_frame()
2088 dma_unmap_single(vptr->dev, rd_info->skb_dma, vptr->rx.buf_sz, in velocity_receive_frame()
2092 vptr->rx.buf_sz, DMA_FROM_DEVICE); in velocity_receive_frame()
2122 int rd_curr = vptr->rx.curr; in velocity_rx_srv()
2126 struct rx_desc *rd = vptr->rx.ring + rd_curr; in velocity_rx_srv()
2128 if (!vptr->rx.info[rd_curr].skb) in velocity_rx_srv()
2159 vptr->rx.curr = rd_curr; in velocity_rx_srv()
2323 struct rx_info rx; in velocity_change_mtu() local
2349 rx = vptr->rx; in velocity_change_mtu()
2352 vptr->rx = tmp_vptr->rx; in velocity_change_mtu()
2355 tmp_vptr->rx = rx; in velocity_change_mtu()