• Home
  • Raw
  • Download

Lines Matching refs:txring

519 	struct jme_ring *txring = &(jme->txring[0]);  in jme_setup_tx_resources()  local
521 txring->alloc = dma_alloc_coherent(&(jme->pdev->dev), in jme_setup_tx_resources()
523 &(txring->dmaalloc), in jme_setup_tx_resources()
526 if (!txring->alloc) { in jme_setup_tx_resources()
527 txring->desc = NULL; in jme_setup_tx_resources()
528 txring->dmaalloc = 0; in jme_setup_tx_resources()
529 txring->dma = 0; in jme_setup_tx_resources()
536 txring->desc = (void *)ALIGN((unsigned long)(txring->alloc), in jme_setup_tx_resources()
538 txring->dma = ALIGN(txring->dmaalloc, RING_DESC_ALIGN); in jme_setup_tx_resources()
539 txring->next_to_use = 0; in jme_setup_tx_resources()
540 atomic_set(&txring->next_to_clean, 0); in jme_setup_tx_resources()
541 atomic_set(&txring->nr_free, jme->tx_ring_size); in jme_setup_tx_resources()
546 memset(txring->alloc, 0, TX_RING_ALLOC_SIZE(jme->tx_ring_size)); in jme_setup_tx_resources()
547 memset(txring->bufinf, 0, in jme_setup_tx_resources()
557 struct jme_ring *txring = &(jme->txring[0]); in jme_free_tx_resources() local
558 struct jme_buffer_info *txbi = txring->bufinf; in jme_free_tx_resources()
560 if (txring->alloc) { in jme_free_tx_resources()
562 txbi = txring->bufinf + i; in jme_free_tx_resources()
575 txring->alloc, in jme_free_tx_resources()
576 txring->dmaalloc); in jme_free_tx_resources()
578 txring->alloc = NULL; in jme_free_tx_resources()
579 txring->desc = NULL; in jme_free_tx_resources()
580 txring->dmaalloc = 0; in jme_free_tx_resources()
581 txring->dma = 0; in jme_free_tx_resources()
583 txring->next_to_use = 0; in jme_free_tx_resources()
584 atomic_set(&txring->next_to_clean, 0); in jme_free_tx_resources()
585 atomic_set(&txring->nr_free, 0); in jme_free_tx_resources()
601 jwrite32(jme, JME_TXDBA_LO, (__u64)jme->txring[0].dma & 0xFFFFFFFFUL); in jme_enable_tx_engine()
602 jwrite32(jme, JME_TXDBA_HI, (__u64)(jme->txring[0].dma) >> 32); in jme_enable_tx_engine()
603 jwrite32(jme, JME_TXNDA, (__u64)jme->txring[0].dma & 0xFFFFFFFFUL); in jme_enable_tx_engine()
1300 struct jme_ring *txring = jme->txring; in jme_wake_queue_if_stopped() local
1304 atomic_read(&txring->nr_free) >= (jme->tx_wake_threshold))) { in jme_wake_queue_if_stopped()
1315 struct jme_ring *txring = &(jme->txring[0]); in jme_tx_clean_tasklet() local
1316 struct txdesc *txdesc = txring->desc; in jme_tx_clean_tasklet()
1317 struct jme_buffer_info *txbi = txring->bufinf, *ctxbi, *ttxbi; in jme_tx_clean_tasklet()
1331 max = jme->tx_ring_size - atomic_read(&txring->nr_free); in jme_tx_clean_tasklet()
1334 for (i = atomic_read(&txring->next_to_clean) ; cnt < max ; ) { in jme_tx_clean_tasklet()
1384 atomic_set(&txring->next_to_clean, i); in jme_tx_clean_tasklet()
1385 atomic_add(cnt, &txring->nr_free); in jme_tx_clean_tasklet()
1672 struct jme_ring *txring = jme->txring; in jme_alloc_txdesc() local
1675 idx = txring->next_to_use; in jme_alloc_txdesc()
1678 if (unlikely(atomic_read(&txring->nr_free) < nr_alloc)) in jme_alloc_txdesc()
1681 atomic_sub(nr_alloc, &txring->nr_free); in jme_alloc_txdesc()
1683 txring->next_to_use = (txring->next_to_use + nr_alloc) & mask; in jme_alloc_txdesc()
1726 struct jme_ring *txring = jme->txring; in jme_map_tx_skb() local
1727 struct txdesc *txdesc = txring->desc, *ctxdesc; in jme_map_tx_skb()
1728 struct jme_buffer_info *txbi = txring->bufinf, *ctxbi; in jme_map_tx_skb()
1839 struct jme_ring *txring = jme->txring; in jme_fill_first_tx_desc() local
1844 txdesc = (struct txdesc *)txring->desc + idx; in jme_fill_first_tx_desc()
1845 txbi = txring->bufinf + idx; in jme_fill_first_tx_desc()
1886 struct jme_ring *txring = jme->txring; in jme_stop_queue_if_full() local
1887 struct jme_buffer_info *txbi = txring->bufinf; in jme_stop_queue_if_full()
1888 int idx = atomic_read(&txring->next_to_clean); in jme_stop_queue_if_full()
1893 if (unlikely(atomic_read(&txring->nr_free) < (MAX_SKB_FRAGS+2))) { in jme_stop_queue_if_full()
1897 if (atomic_read(&txring->nr_free) in jme_stop_queue_if_full()