Lines Matching refs:txring
558 struct jme_ring *txring = &(jme->txring[0]); in jme_setup_tx_resources() local
560 txring->alloc = dma_alloc_coherent(&(jme->pdev->dev), in jme_setup_tx_resources()
562 &(txring->dmaalloc), in jme_setup_tx_resources()
565 if (!txring->alloc) in jme_setup_tx_resources()
571 txring->desc = (void *)ALIGN((unsigned long)(txring->alloc), in jme_setup_tx_resources()
573 txring->dma = ALIGN(txring->dmaalloc, RING_DESC_ALIGN); in jme_setup_tx_resources()
574 txring->next_to_use = 0; in jme_setup_tx_resources()
575 atomic_set(&txring->next_to_clean, 0); in jme_setup_tx_resources()
576 atomic_set(&txring->nr_free, jme->tx_ring_size); in jme_setup_tx_resources()
578 txring->bufinf = kcalloc(jme->tx_ring_size, in jme_setup_tx_resources()
581 if (unlikely(!(txring->bufinf))) in jme_setup_tx_resources()
589 txring->alloc, in jme_setup_tx_resources()
590 txring->dmaalloc); in jme_setup_tx_resources()
593 txring->desc = NULL; in jme_setup_tx_resources()
594 txring->dmaalloc = 0; in jme_setup_tx_resources()
595 txring->dma = 0; in jme_setup_tx_resources()
596 txring->bufinf = NULL; in jme_setup_tx_resources()
605 struct jme_ring *txring = &(jme->txring[0]); in jme_free_tx_resources() local
608 if (txring->alloc) { in jme_free_tx_resources()
609 if (txring->bufinf) { in jme_free_tx_resources()
611 txbi = txring->bufinf + i; in jme_free_tx_resources()
621 kfree(txring->bufinf); in jme_free_tx_resources()
626 txring->alloc, in jme_free_tx_resources()
627 txring->dmaalloc); in jme_free_tx_resources()
629 txring->alloc = NULL; in jme_free_tx_resources()
630 txring->desc = NULL; in jme_free_tx_resources()
631 txring->dmaalloc = 0; in jme_free_tx_resources()
632 txring->dma = 0; in jme_free_tx_resources()
633 txring->bufinf = NULL; in jme_free_tx_resources()
635 txring->next_to_use = 0; in jme_free_tx_resources()
636 atomic_set(&txring->next_to_clean, 0); in jme_free_tx_resources()
637 atomic_set(&txring->nr_free, 0); in jme_free_tx_resources()
652 jwrite32(jme, JME_TXDBA_LO, (__u64)jme->txring[0].dma & 0xFFFFFFFFUL); in jme_enable_tx_engine()
653 jwrite32(jme, JME_TXDBA_HI, (__u64)(jme->txring[0].dma) >> 32); in jme_enable_tx_engine()
654 jwrite32(jme, JME_TXNDA, (__u64)jme->txring[0].dma & 0xFFFFFFFFUL); in jme_enable_tx_engine()
1408 struct jme_ring *txring = &(jme->txring[0]); in jme_wake_queue_if_stopped() local
1412 atomic_read(&txring->nr_free) >= (jme->tx_wake_threshold))) { in jme_wake_queue_if_stopped()
1423 struct jme_ring *txring = &(jme->txring[0]); in jme_tx_clean_tasklet() local
1424 struct txdesc *txdesc = txring->desc; in jme_tx_clean_tasklet()
1425 struct jme_buffer_info *txbi = txring->bufinf, *ctxbi, *ttxbi; in jme_tx_clean_tasklet()
1439 max = jme->tx_ring_size - atomic_read(&txring->nr_free); in jme_tx_clean_tasklet()
1442 for (i = atomic_read(&txring->next_to_clean) ; cnt < max ; ) { in jme_tx_clean_tasklet()
1492 atomic_set(&txring->next_to_clean, i); in jme_tx_clean_tasklet()
1493 atomic_add(cnt, &txring->nr_free); in jme_tx_clean_tasklet()
1949 struct jme_ring *txring = &(jme->txring[0]); in jme_alloc_txdesc() local
1952 idx = txring->next_to_use; in jme_alloc_txdesc()
1955 if (unlikely(atomic_read(&txring->nr_free) < nr_alloc)) in jme_alloc_txdesc()
1958 atomic_sub(nr_alloc, &txring->nr_free); in jme_alloc_txdesc()
1960 txring->next_to_use = (txring->next_to_use + nr_alloc) & mask; in jme_alloc_txdesc()
2006 struct jme_ring *txring = &(jme->txring[0]); in jme_drop_tx_map() local
2007 struct jme_buffer_info *txbi = txring->bufinf, *ctxbi; in jme_drop_tx_map()
2026 struct jme_ring *txring = &(jme->txring[0]); in jme_map_tx_skb() local
2027 struct txdesc *txdesc = txring->desc, *ctxdesc; in jme_map_tx_skb()
2028 struct jme_buffer_info *txbi = txring->bufinf, *ctxbi; in jme_map_tx_skb()
2138 struct jme_ring *txring = &(jme->txring[0]); in jme_fill_tx_desc() local
2144 txdesc = (struct txdesc *)txring->desc + idx; in jme_fill_tx_desc()
2145 txbi = txring->bufinf + idx; in jme_fill_tx_desc()
2190 struct jme_ring *txring = &(jme->txring[0]); in jme_stop_queue_if_full() local
2191 struct jme_buffer_info *txbi = txring->bufinf; in jme_stop_queue_if_full()
2192 int idx = atomic_read(&txring->next_to_clean); in jme_stop_queue_if_full()
2197 if (unlikely(atomic_read(&txring->nr_free) < (MAX_SKB_FRAGS+2))) { in jme_stop_queue_if_full()
2201 if (atomic_read(&txring->nr_free) in jme_stop_queue_if_full()