Lines Matching refs:rx_ring

75 	struct bcm4908_enet_dma_ring rx_ring;  member
188 struct bcm4908_enet_dma_ring *rx_ring = &enet->rx_ring; in bcm4908_enet_dma_free() local
192 size = rx_ring->length * sizeof(struct bcm4908_enet_dma_ring_bd); in bcm4908_enet_dma_free()
193 if (rx_ring->cpu_addr) in bcm4908_enet_dma_free()
194 dma_free_coherent(dev, size, rx_ring->cpu_addr, rx_ring->dma_addr); in bcm4908_enet_dma_free()
195 kfree(rx_ring->slots); in bcm4908_enet_dma_free()
206 struct bcm4908_enet_dma_ring *rx_ring = &enet->rx_ring; in bcm4908_enet_dma_alloc() local
220 rx_ring->length = ENET_RX_BDS_NUM; in bcm4908_enet_dma_alloc()
221 rx_ring->is_tx = 0; in bcm4908_enet_dma_alloc()
222 rx_ring->cfg_block = ENET_DMA_CH_RX_CFG; in bcm4908_enet_dma_alloc()
223 rx_ring->st_ram_block = ENET_DMA_CH_RX_STATE_RAM; in bcm4908_enet_dma_alloc()
224 err = bcm4908_dma_alloc_buf_descs(enet, rx_ring); in bcm4908_enet_dma_alloc()
236 struct bcm4908_enet_dma_ring *rings[] = { &enet->rx_ring, &enet->tx_ring }; in bcm4908_enet_dma_reset()
257 struct bcm4908_enet_dma_ring_bd *buf_desc = &enet->rx_ring.buf_desc[idx]; in bcm4908_enet_dma_alloc_rx_buf()
258 struct bcm4908_enet_dma_ring_slot *slot = &enet->rx_ring.slots[idx]; in bcm4908_enet_dma_alloc_rx_buf()
280 if (idx == enet->rx_ring.length - 1) in bcm4908_enet_dma_alloc_rx_buf()
311 struct bcm4908_enet_dma_ring *rx_ring = &enet->rx_ring; in bcm4908_enet_dma_uninit() local
316 for (i = rx_ring->length - 1; i >= 0; i--) { in bcm4908_enet_dma_uninit()
317 slot = &rx_ring->slots[i]; in bcm4908_enet_dma_uninit()
328 struct bcm4908_enet_dma_ring *rx_ring = &enet->rx_ring; in bcm4908_enet_dma_init() local
333 for (i = 0; i < rx_ring->length; i++) { in bcm4908_enet_dma_init()
343 bcm4908_enet_dma_ring_init(enet, &enet->rx_ring); in bcm4908_enet_dma_init()
428 ring = (irq == enet->irq_tx) ? &enet->tx_ring : &enet->rx_ring; in bcm4908_enet_irq_handler()
442 struct bcm4908_enet_dma_ring *rx_ring = &enet->rx_ring; in bcm4908_enet_open() local
478 bcm4908_enet_dma_rx_ring_enable(enet, rx_ring); in bcm4908_enet_open()
479 napi_enable(&rx_ring->napi); in bcm4908_enet_open()
482 bcm4908_enet_dma_ring_intrs_ack(enet, rx_ring); in bcm4908_enet_open()
483 bcm4908_enet_dma_ring_intrs_on(enet, rx_ring); in bcm4908_enet_open()
492 struct bcm4908_enet_dma_ring *rx_ring = &enet->rx_ring; in bcm4908_enet_stop() local
496 napi_disable(&rx_ring->napi); in bcm4908_enet_stop()
499 bcm4908_enet_dma_rx_ring_disable(enet, &enet->rx_ring); in bcm4908_enet_stop()
572 struct bcm4908_enet_dma_ring *rx_ring = container_of(napi, struct bcm4908_enet_dma_ring, napi); in bcm4908_enet_poll_rx() local
573 struct bcm4908_enet *enet = container_of(rx_ring, struct bcm4908_enet, rx_ring); in bcm4908_enet_poll_rx()
584 buf_desc = &enet->rx_ring.buf_desc[enet->rx_ring.read_idx]; in bcm4908_enet_poll_rx()
589 slot = enet->rx_ring.slots[enet->rx_ring.read_idx]; in bcm4908_enet_poll_rx()
592 err = bcm4908_enet_dma_alloc_rx_buf(enet, enet->rx_ring.read_idx); in bcm4908_enet_poll_rx()
596 if (++enet->rx_ring.read_idx == enet->rx_ring.length) in bcm4908_enet_poll_rx()
597 enet->rx_ring.read_idx = 0; in bcm4908_enet_poll_rx()
622 bcm4908_enet_dma_ring_intrs_on(enet, rx_ring); in bcm4908_enet_poll_rx()
626 bcm4908_enet_dma_rx_ring_enable(enet, &enet->rx_ring); in bcm4908_enet_poll_rx()
728 netif_napi_add(netdev, &enet->rx_ring.napi, bcm4908_enet_poll_rx, NAPI_POLL_WEIGHT); in bcm4908_enet_probe()
746 netif_napi_del(&enet->rx_ring.napi); in bcm4908_enet_remove()