Lines Matching refs:txring

559 	struct jme_ring *txring = &(jme->txring[0]);  in jme_setup_tx_resources()  local
561 txring->alloc = dma_alloc_coherent(&(jme->pdev->dev), in jme_setup_tx_resources()
563 &(txring->dmaalloc), in jme_setup_tx_resources()
566 if (!txring->alloc) in jme_setup_tx_resources()
572 txring->desc = (void *)ALIGN((unsigned long)(txring->alloc), in jme_setup_tx_resources()
574 txring->dma = ALIGN(txring->dmaalloc, RING_DESC_ALIGN); in jme_setup_tx_resources()
575 txring->next_to_use = 0; in jme_setup_tx_resources()
576 atomic_set(&txring->next_to_clean, 0); in jme_setup_tx_resources()
577 atomic_set(&txring->nr_free, jme->tx_ring_size); in jme_setup_tx_resources()
579 txring->bufinf = kcalloc(jme->tx_ring_size, in jme_setup_tx_resources()
582 if (unlikely(!(txring->bufinf))) in jme_setup_tx_resources()
590 txring->alloc, in jme_setup_tx_resources()
591 txring->dmaalloc); in jme_setup_tx_resources()
594 txring->desc = NULL; in jme_setup_tx_resources()
595 txring->dmaalloc = 0; in jme_setup_tx_resources()
596 txring->dma = 0; in jme_setup_tx_resources()
597 txring->bufinf = NULL; in jme_setup_tx_resources()
606 struct jme_ring *txring = &(jme->txring[0]); in jme_free_tx_resources() local
609 if (txring->alloc) { in jme_free_tx_resources()
610 if (txring->bufinf) { in jme_free_tx_resources()
612 txbi = txring->bufinf + i; in jme_free_tx_resources()
622 kfree(txring->bufinf); in jme_free_tx_resources()
627 txring->alloc, in jme_free_tx_resources()
628 txring->dmaalloc); in jme_free_tx_resources()
630 txring->alloc = NULL; in jme_free_tx_resources()
631 txring->desc = NULL; in jme_free_tx_resources()
632 txring->dmaalloc = 0; in jme_free_tx_resources()
633 txring->dma = 0; in jme_free_tx_resources()
634 txring->bufinf = NULL; in jme_free_tx_resources()
636 txring->next_to_use = 0; in jme_free_tx_resources()
637 atomic_set(&txring->next_to_clean, 0); in jme_free_tx_resources()
638 atomic_set(&txring->nr_free, 0); in jme_free_tx_resources()
653 jwrite32(jme, JME_TXDBA_LO, (__u64)jme->txring[0].dma & 0xFFFFFFFFUL); in jme_enable_tx_engine()
654 jwrite32(jme, JME_TXDBA_HI, (__u64)(jme->txring[0].dma) >> 32); in jme_enable_tx_engine()
655 jwrite32(jme, JME_TXNDA, (__u64)jme->txring[0].dma & 0xFFFFFFFFUL); in jme_enable_tx_engine()
1402 struct jme_ring *txring = &(jme->txring[0]); in jme_wake_queue_if_stopped() local
1406 atomic_read(&txring->nr_free) >= (jme->tx_wake_threshold))) { in jme_wake_queue_if_stopped()
1416 struct jme_ring *txring = &(jme->txring[0]); in jme_tx_clean_tasklet() local
1417 struct txdesc *txdesc = txring->desc; in jme_tx_clean_tasklet()
1418 struct jme_buffer_info *txbi = txring->bufinf, *ctxbi, *ttxbi; in jme_tx_clean_tasklet()
1432 max = jme->tx_ring_size - atomic_read(&txring->nr_free); in jme_tx_clean_tasklet()
1435 for (i = atomic_read(&txring->next_to_clean) ; cnt < max ; ) { in jme_tx_clean_tasklet()
1484 atomic_set(&txring->next_to_clean, i); in jme_tx_clean_tasklet()
1485 atomic_add(cnt, &txring->nr_free); in jme_tx_clean_tasklet()
1936 struct jme_ring *txring = &(jme->txring[0]); in jme_alloc_txdesc() local
1939 idx = txring->next_to_use; in jme_alloc_txdesc()
1942 if (unlikely(atomic_read(&txring->nr_free) < nr_alloc)) in jme_alloc_txdesc()
1945 atomic_sub(nr_alloc, &txring->nr_free); in jme_alloc_txdesc()
1947 txring->next_to_use = (txring->next_to_use + nr_alloc) & mask; in jme_alloc_txdesc()
1987 struct jme_ring *txring = &(jme->txring[0]); in jme_drop_tx_map() local
1988 struct jme_buffer_info *txbi = txring->bufinf, *ctxbi; in jme_drop_tx_map()
2005 struct jme_ring *txring = &(jme->txring[0]); in jme_map_tx_skb() local
2006 struct txdesc *txdesc = txring->desc, *ctxdesc; in jme_map_tx_skb()
2007 struct jme_buffer_info *txbi = txring->bufinf, *ctxbi; in jme_map_tx_skb()
2112 struct jme_ring *txring = &(jme->txring[0]); in jme_fill_tx_desc() local
2118 txdesc = (struct txdesc *)txring->desc + idx; in jme_fill_tx_desc()
2119 txbi = txring->bufinf + idx; in jme_fill_tx_desc()
2164 struct jme_ring *txring = &(jme->txring[0]); in jme_stop_queue_if_full() local
2165 struct jme_buffer_info *txbi = txring->bufinf; in jme_stop_queue_if_full()
2166 int idx = atomic_read(&txring->next_to_clean); in jme_stop_queue_if_full()
2171 if (unlikely(atomic_read(&txring->nr_free) < (MAX_SKB_FRAGS+2))) { in jme_stop_queue_if_full()
2175 if (atomic_read(&txring->nr_free) in jme_stop_queue_if_full()