Lines Matching refs:tx_ring
85 struct bcm4908_enet_dma_ring tx_ring; member
198 struct bcm4908_enet_dma_ring *tx_ring = &enet->tx_ring; in bcm4908_enet_dma_free() local
208 size = tx_ring->length * sizeof(struct bcm4908_enet_dma_ring_bd); in bcm4908_enet_dma_free()
209 if (tx_ring->cpu_addr) in bcm4908_enet_dma_free()
210 dma_free_coherent(dev, size, tx_ring->cpu_addr, tx_ring->dma_addr); in bcm4908_enet_dma_free()
211 kfree(tx_ring->slots); in bcm4908_enet_dma_free()
216 struct bcm4908_enet_dma_ring *tx_ring = &enet->tx_ring; in bcm4908_enet_dma_alloc() local
221 tx_ring->length = ENET_TX_BDS_NUM; in bcm4908_enet_dma_alloc()
222 tx_ring->is_tx = 1; in bcm4908_enet_dma_alloc()
223 tx_ring->cfg_block = ENET_DMA_CH_TX_CFG; in bcm4908_enet_dma_alloc()
224 tx_ring->st_ram_block = ENET_DMA_CH_TX_STATE_RAM; in bcm4908_enet_dma_alloc()
225 err = bcm4908_dma_alloc_buf_descs(enet, tx_ring); in bcm4908_enet_dma_alloc()
247 struct bcm4908_enet_dma_ring *rings[] = { &enet->rx_ring, &enet->tx_ring }; in bcm4908_enet_dma_reset()
352 bcm4908_enet_dma_ring_init(enet, &enet->tx_ring); in bcm4908_enet_dma_init()
438 ring = (irq == enet->irq_tx) ? &enet->tx_ring : &enet->rx_ring; in bcm4908_enet_irq_handler()
451 struct bcm4908_enet_dma_ring *tx_ring = &enet->tx_ring; in bcm4908_enet_open() local
483 napi_enable(&tx_ring->napi); in bcm4908_enet_open()
484 bcm4908_enet_dma_ring_intrs_ack(enet, tx_ring); in bcm4908_enet_open()
485 bcm4908_enet_dma_ring_intrs_on(enet, tx_ring); in bcm4908_enet_open()
501 struct bcm4908_enet_dma_ring *tx_ring = &enet->tx_ring; in bcm4908_enet_stop() local
507 napi_disable(&tx_ring->napi); in bcm4908_enet_stop()
511 bcm4908_enet_dma_tx_ring_disable(enet, &enet->tx_ring); in bcm4908_enet_stop()
524 struct bcm4908_enet_dma_ring *ring = &enet->tx_ring; in bcm4908_enet_start_xmit()
534 napi_schedule(&enet->tx_ring.napi); in bcm4908_enet_start_xmit()
573 bcm4908_enet_dma_tx_ring_enable(enet, &enet->tx_ring); in bcm4908_enet_start_xmit()
653 struct bcm4908_enet_dma_ring *tx_ring = container_of(napi, struct bcm4908_enet_dma_ring, napi); in bcm4908_enet_poll_tx() local
654 struct bcm4908_enet *enet = container_of(tx_ring, struct bcm4908_enet, tx_ring); in bcm4908_enet_poll_tx()
661 while (handled < weight && tx_ring->read_idx != tx_ring->write_idx) { in bcm4908_enet_poll_tx()
662 buf_desc = &tx_ring->buf_desc[tx_ring->read_idx]; in bcm4908_enet_poll_tx()
665 slot = &tx_ring->slots[tx_ring->read_idx]; in bcm4908_enet_poll_tx()
673 if (++tx_ring->read_idx == tx_ring->length) in bcm4908_enet_poll_tx()
674 tx_ring->read_idx = 0; in bcm4908_enet_poll_tx()
683 bcm4908_enet_dma_ring_intrs_on(enet, tx_ring); in bcm4908_enet_poll_tx()
754 netif_napi_add_tx(netdev, &enet->tx_ring.napi, bcm4908_enet_poll_tx); in bcm4908_enet_probe()
777 netif_napi_del(&enet->tx_ring.napi); in bcm4908_enet_remove()