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()
1400 struct jme_ring *txring = &(jme->txring[0]); in jme_wake_queue_if_stopped() local
1404 atomic_read(&txring->nr_free) >= (jme->tx_wake_threshold))) { in jme_wake_queue_if_stopped()
1414 struct jme_ring *txring = &(jme->txring[0]); in jme_tx_clean_tasklet() local
1415 struct txdesc *txdesc = txring->desc; in jme_tx_clean_tasklet()
1416 struct jme_buffer_info *txbi = txring->bufinf, *ctxbi, *ttxbi; in jme_tx_clean_tasklet()
1430 max = jme->tx_ring_size - atomic_read(&txring->nr_free); in jme_tx_clean_tasklet()
1433 for (i = atomic_read(&txring->next_to_clean) ; cnt < max ; ) { in jme_tx_clean_tasklet()
1482 atomic_set(&txring->next_to_clean, i); in jme_tx_clean_tasklet()
1483 atomic_add(cnt, &txring->nr_free); in jme_tx_clean_tasklet()
1934 struct jme_ring *txring = &(jme->txring[0]); in jme_alloc_txdesc() local
1937 idx = txring->next_to_use; in jme_alloc_txdesc()
1940 if (unlikely(atomic_read(&txring->nr_free) < nr_alloc)) in jme_alloc_txdesc()
1943 atomic_sub(nr_alloc, &txring->nr_free); in jme_alloc_txdesc()
1945 txring->next_to_use = (txring->next_to_use + nr_alloc) & mask; in jme_alloc_txdesc()
1985 struct jme_ring *txring = &(jme->txring[0]); in jme_drop_tx_map() local
1986 struct jme_buffer_info *txbi = txring->bufinf, *ctxbi; in jme_drop_tx_map()
2003 struct jme_ring *txring = &(jme->txring[0]); in jme_map_tx_skb() local
2004 struct txdesc *txdesc = txring->desc, *ctxdesc; in jme_map_tx_skb()
2005 struct jme_buffer_info *txbi = txring->bufinf, *ctxbi; in jme_map_tx_skb()
2110 struct jme_ring *txring = &(jme->txring[0]); in jme_fill_tx_desc() local
2116 txdesc = (struct txdesc *)txring->desc + idx; in jme_fill_tx_desc()
2117 txbi = txring->bufinf + idx; in jme_fill_tx_desc()
2162 struct jme_ring *txring = &(jme->txring[0]); in jme_stop_queue_if_full() local
2163 struct jme_buffer_info *txbi = txring->bufinf; in jme_stop_queue_if_full()
2164 int idx = atomic_read(&txring->next_to_clean); in jme_stop_queue_if_full()
2169 if (unlikely(atomic_read(&txring->nr_free) < (MAX_SKB_FRAGS+2))) { in jme_stop_queue_if_full()
2173 if (atomic_read(&txring->nr_free) in jme_stop_queue_if_full()