Lines Matching refs:txring
566 struct jme_ring *txring = &(jme->txring[0]); in jme_setup_tx_resources() local
568 txring->alloc = dma_alloc_coherent(&(jme->pdev->dev), in jme_setup_tx_resources()
570 &(txring->dmaalloc), in jme_setup_tx_resources()
573 if (!txring->alloc) in jme_setup_tx_resources()
579 txring->desc = (void *)ALIGN((unsigned long)(txring->alloc), in jme_setup_tx_resources()
581 txring->dma = ALIGN(txring->dmaalloc, RING_DESC_ALIGN); in jme_setup_tx_resources()
582 txring->next_to_use = 0; in jme_setup_tx_resources()
583 atomic_set(&txring->next_to_clean, 0); in jme_setup_tx_resources()
584 atomic_set(&txring->nr_free, jme->tx_ring_size); in jme_setup_tx_resources()
586 txring->bufinf = kmalloc(sizeof(struct jme_buffer_info) * in jme_setup_tx_resources()
588 if (unlikely(!(txring->bufinf))) in jme_setup_tx_resources()
594 memset(txring->alloc, 0, TX_RING_ALLOC_SIZE(jme->tx_ring_size)); in jme_setup_tx_resources()
595 memset(txring->bufinf, 0, in jme_setup_tx_resources()
603 txring->alloc, in jme_setup_tx_resources()
604 txring->dmaalloc); in jme_setup_tx_resources()
607 txring->desc = NULL; in jme_setup_tx_resources()
608 txring->dmaalloc = 0; in jme_setup_tx_resources()
609 txring->dma = 0; in jme_setup_tx_resources()
610 txring->bufinf = NULL; in jme_setup_tx_resources()
619 struct jme_ring *txring = &(jme->txring[0]); in jme_free_tx_resources() local
622 if (txring->alloc) { in jme_free_tx_resources()
623 if (txring->bufinf) { in jme_free_tx_resources()
625 txbi = txring->bufinf + i; in jme_free_tx_resources()
635 kfree(txring->bufinf); in jme_free_tx_resources()
640 txring->alloc, in jme_free_tx_resources()
641 txring->dmaalloc); in jme_free_tx_resources()
643 txring->alloc = NULL; in jme_free_tx_resources()
644 txring->desc = NULL; in jme_free_tx_resources()
645 txring->dmaalloc = 0; in jme_free_tx_resources()
646 txring->dma = 0; in jme_free_tx_resources()
647 txring->bufinf = NULL; in jme_free_tx_resources()
649 txring->next_to_use = 0; in jme_free_tx_resources()
650 atomic_set(&txring->next_to_clean, 0); in jme_free_tx_resources()
651 atomic_set(&txring->nr_free, 0); in jme_free_tx_resources()
666 jwrite32(jme, JME_TXDBA_LO, (__u64)jme->txring[0].dma & 0xFFFFFFFFUL); in jme_enable_tx_engine()
667 jwrite32(jme, JME_TXDBA_HI, (__u64)(jme->txring[0].dma) >> 32); in jme_enable_tx_engine()
668 jwrite32(jme, JME_TXNDA, (__u64)jme->txring[0].dma & 0xFFFFFFFFUL); in jme_enable_tx_engine()
1434 struct jme_ring *txring = &(jme->txring[0]); in jme_wake_queue_if_stopped() local
1438 atomic_read(&txring->nr_free) >= (jme->tx_wake_threshold))) { in jme_wake_queue_if_stopped()
1449 struct jme_ring *txring = &(jme->txring[0]); in jme_tx_clean_tasklet() local
1450 struct txdesc *txdesc = txring->desc; in jme_tx_clean_tasklet()
1451 struct jme_buffer_info *txbi = txring->bufinf, *ctxbi, *ttxbi; in jme_tx_clean_tasklet()
1465 max = jme->tx_ring_size - atomic_read(&txring->nr_free); in jme_tx_clean_tasklet()
1468 for (i = atomic_read(&txring->next_to_clean) ; cnt < max ; ) { in jme_tx_clean_tasklet()
1518 atomic_set(&txring->next_to_clean, i); in jme_tx_clean_tasklet()
1519 atomic_add(cnt, &txring->nr_free); in jme_tx_clean_tasklet()
1975 struct jme_ring *txring = &(jme->txring[0]); in jme_alloc_txdesc() local
1978 idx = txring->next_to_use; in jme_alloc_txdesc()
1981 if (unlikely(atomic_read(&txring->nr_free) < nr_alloc)) in jme_alloc_txdesc()
1984 atomic_sub(nr_alloc, &txring->nr_free); in jme_alloc_txdesc()
1986 txring->next_to_use = (txring->next_to_use + nr_alloc) & mask; in jme_alloc_txdesc()
2032 struct jme_ring *txring = &(jme->txring[0]); in jme_drop_tx_map() local
2033 struct jme_buffer_info *txbi = txring->bufinf, *ctxbi; in jme_drop_tx_map()
2053 struct jme_ring *txring = &(jme->txring[0]); in jme_map_tx_skb() local
2054 struct txdesc *txdesc = txring->desc, *ctxdesc; in jme_map_tx_skb()
2055 struct jme_buffer_info *txbi = txring->bufinf, *ctxbi; in jme_map_tx_skb()
2166 struct jme_ring *txring = &(jme->txring[0]); in jme_fill_tx_desc() local
2172 txdesc = (struct txdesc *)txring->desc + idx; in jme_fill_tx_desc()
2173 txbi = txring->bufinf + idx; in jme_fill_tx_desc()
2218 struct jme_ring *txring = &(jme->txring[0]); in jme_stop_queue_if_full() local
2219 struct jme_buffer_info *txbi = txring->bufinf; in jme_stop_queue_if_full()
2220 int idx = atomic_read(&txring->next_to_clean); in jme_stop_queue_if_full()
2225 if (unlikely(atomic_read(&txring->nr_free) < (MAX_SKB_FRAGS+2))) { in jme_stop_queue_if_full()
2229 if (atomic_read(&txring->nr_free) in jme_stop_queue_if_full()