• Home
  • Raw
  • Download

Lines Matching refs:tx_ring

31 int fm10k_setup_tx_resources(struct fm10k_ring *tx_ring)  in fm10k_setup_tx_resources()  argument
33 struct device *dev = tx_ring->dev; in fm10k_setup_tx_resources()
36 size = sizeof(struct fm10k_tx_buffer) * tx_ring->count; in fm10k_setup_tx_resources()
38 tx_ring->tx_buffer = vzalloc(size); in fm10k_setup_tx_resources()
39 if (!tx_ring->tx_buffer) in fm10k_setup_tx_resources()
42 u64_stats_init(&tx_ring->syncp); in fm10k_setup_tx_resources()
45 tx_ring->size = tx_ring->count * sizeof(struct fm10k_tx_desc); in fm10k_setup_tx_resources()
46 tx_ring->size = ALIGN(tx_ring->size, 4096); in fm10k_setup_tx_resources()
48 tx_ring->desc = dma_alloc_coherent(dev, tx_ring->size, in fm10k_setup_tx_resources()
49 &tx_ring->dma, GFP_KERNEL); in fm10k_setup_tx_resources()
50 if (!tx_ring->desc) in fm10k_setup_tx_resources()
56 vfree(tx_ring->tx_buffer); in fm10k_setup_tx_resources()
57 tx_ring->tx_buffer = NULL; in fm10k_setup_tx_resources()
76 err = fm10k_setup_tx_resources(interface->tx_ring[i]); in fm10k_setup_all_tx_resources()
89 fm10k_free_tx_resources(interface->tx_ring[i]); in fm10k_setup_all_tx_resources()
186 static void fm10k_clean_tx_ring(struct fm10k_ring *tx_ring) in fm10k_clean_tx_ring() argument
193 if (!tx_ring->tx_buffer) in fm10k_clean_tx_ring()
197 for (i = 0; i < tx_ring->count; i++) { in fm10k_clean_tx_ring()
198 tx_buffer = &tx_ring->tx_buffer[i]; in fm10k_clean_tx_ring()
199 fm10k_unmap_and_free_tx_resource(tx_ring, tx_buffer); in fm10k_clean_tx_ring()
203 netdev_tx_reset_queue(txring_txq(tx_ring)); in fm10k_clean_tx_ring()
205 size = sizeof(struct fm10k_tx_buffer) * tx_ring->count; in fm10k_clean_tx_ring()
206 memset(tx_ring->tx_buffer, 0, size); in fm10k_clean_tx_ring()
209 memset(tx_ring->desc, 0, tx_ring->size); in fm10k_clean_tx_ring()
218 void fm10k_free_tx_resources(struct fm10k_ring *tx_ring) in fm10k_free_tx_resources() argument
220 fm10k_clean_tx_ring(tx_ring); in fm10k_free_tx_resources()
222 vfree(tx_ring->tx_buffer); in fm10k_free_tx_resources()
223 tx_ring->tx_buffer = NULL; in fm10k_free_tx_resources()
226 if (!tx_ring->desc) in fm10k_free_tx_resources()
229 dma_free_coherent(tx_ring->dev, tx_ring->size, in fm10k_free_tx_resources()
230 tx_ring->desc, tx_ring->dma); in fm10k_free_tx_resources()
231 tx_ring->desc = NULL; in fm10k_free_tx_resources()
243 fm10k_clean_tx_ring(interface->tx_ring[i]); in fm10k_clean_all_tx_rings()
257 fm10k_free_tx_resources(interface->tx_ring[i]); in fm10k_free_all_tx_resources()
704 err = fm10k_xmit_frame_ring(skb, interface->tx_ring[r_idx]); in fm10k_xmit_frame()
731 struct fm10k_ring *tx_ring = interface->tx_ring[i]; in fm10k_tx_timeout() local
733 if (check_for_tx_hang(tx_ring) && fm10k_check_tx_hang(tx_ring)) in fm10k_tx_timeout()
1158 ring = READ_ONCE(interface->tx_ring[i]); in fm10k_get_stats64()