Lines Matching refs:tx_ring
69 struct ocelot_fdma_tx_ring *tx_ring = &fdma->tx_ring; in ocelot_fdma_tx_ring_free() local
71 if (tx_ring->next_to_use >= tx_ring->next_to_clean) in ocelot_fdma_tx_ring_free()
73 (tx_ring->next_to_use - tx_ring->next_to_clean) - 1; in ocelot_fdma_tx_ring_free()
75 return tx_ring->next_to_clean - tx_ring->next_to_use - 1; in ocelot_fdma_tx_ring_free()
80 struct ocelot_fdma_tx_ring *tx_ring = &fdma->tx_ring; in ocelot_fdma_tx_ring_empty() local
82 return tx_ring->next_to_clean == tx_ring->next_to_use; in ocelot_fdma_tx_ring_empty()
484 struct ocelot_fdma_tx_ring *tx_ring; in ocelot_fdma_tx_cleanup() local
495 tx_ring = &fdma->tx_ring; in ocelot_fdma_tx_cleanup()
501 ntc = tx_ring->next_to_clean; in ocelot_fdma_tx_cleanup()
502 dcb = &tx_ring->dcbs[ntc]; in ocelot_fdma_tx_cleanup()
506 buf = &tx_ring->bufs[ntc]; in ocelot_fdma_tx_cleanup()
514 tx_ring->next_to_clean = ocelot_fdma_idx_next(ntc, in ocelot_fdma_tx_cleanup()
542 new_null_llp_idx = ocelot_fdma_idx_prev(tx_ring->next_to_use, in ocelot_fdma_tx_cleanup()
544 dcb = &tx_ring->dcbs[new_null_llp_idx]; in ocelot_fdma_tx_cleanup()
547 dma = ocelot_fdma_idx_dma(tx_ring->dcbs_dma, tx_ring->next_to_clean); in ocelot_fdma_tx_cleanup()
610 struct ocelot_fdma_tx_ring *tx_ring = &fdma->tx_ring; in ocelot_fdma_send_skb() local
616 dcb = &tx_ring->dcbs[tx_ring->next_to_use]; in ocelot_fdma_send_skb()
617 tx_buf = &tx_ring->bufs[tx_ring->next_to_use]; in ocelot_fdma_send_skb()
623 next_idx = ocelot_fdma_idx_next(tx_ring->next_to_use, in ocelot_fdma_send_skb()
629 dma = ocelot_fdma_idx_dma(tx_ring->dcbs_dma, in ocelot_fdma_send_skb()
630 tx_ring->next_to_use); in ocelot_fdma_send_skb()
634 dcb->llp = ocelot_fdma_idx_dma(tx_ring->dcbs_dma, next_idx); in ocelot_fdma_send_skb()
637 tx_ring->next_to_use = next_idx; in ocelot_fdma_send_skb()
679 spin_lock(&fdma->tx_ring.xmit_lock); in ocelot_fdma_inject_frame()
693 spin_unlock(&fdma->tx_ring.xmit_lock); in ocelot_fdma_inject_frame()
724 struct ocelot_fdma_tx_ring *tx_ring; in ocelot_fdma_free_tx_ring() local
729 tx_ring = &fdma->tx_ring; in ocelot_fdma_free_tx_ring()
730 idx = tx_ring->next_to_clean; in ocelot_fdma_free_tx_ring()
732 while (idx != tx_ring->next_to_use) { in ocelot_fdma_free_tx_ring()
733 txb = &tx_ring->bufs[idx]; in ocelot_fdma_free_tx_ring()
767 fdma->tx_ring.dcbs = dcbs; in ocelot_fdma_rings_alloc()
768 fdma->tx_ring.dcbs_dma = dcbs_dma; in ocelot_fdma_rings_alloc()
769 spin_lock_init(&fdma->tx_ring.xmit_lock); in ocelot_fdma_rings_alloc()