Lines Matching defs:txring
501 struct jme_ring *txring = &(jme->txring[0]);
503 txring->alloc = dma_alloc_coherent(&(jme->pdev->dev),
505 &(txring->dmaalloc),
508 if (!txring->alloc)
514 txring->desc = (void *)ALIGN((unsigned long)(txring->alloc),
516 txring->dma = ALIGN(txring->dmaalloc, RING_DESC_ALIGN);
517 txring->next_to_use = 0;
518 atomic_set(&txring->next_to_clean, 0);
519 atomic_set(&txring->nr_free, jme->tx_ring_size);
521 txring->bufinf = kmalloc(sizeof(struct jme_buffer_info) *
523 if (unlikely(!(txring->bufinf)))
529 memset(txring->alloc, 0, TX_RING_ALLOC_SIZE(jme->tx_ring_size));
530 memset(txring->bufinf, 0,
538 txring->alloc,
539 txring->dmaalloc);
542 txring->desc = NULL;
543 txring->dmaalloc = 0;
544 txring->dma = 0;
545 txring->bufinf = NULL;
554 struct jme_ring *txring = &(jme->txring[0]);
557 if (txring->alloc) {
558 if (txring->bufinf) {
560 txbi = txring->bufinf + i;
570 kfree(txring->bufinf);
575 txring->alloc,
576 txring->dmaalloc);
578 txring->alloc = NULL;
579 txring->desc = NULL;
580 txring->dmaalloc = 0;
581 txring->dma = 0;
582 txring->bufinf = NULL;
584 txring->next_to_use = 0;
585 atomic_set(&txring->next_to_clean, 0);
586 atomic_set(&txring->nr_free, 0);
601 jwrite32(jme, JME_TXDBA_LO, (__u64)jme->txring[0].dma & 0xFFFFFFFFUL);
602 jwrite32(jme, JME_TXDBA_HI, (__u64)(jme->txring[0].dma) >> 32);
603 jwrite32(jme, JME_TXNDA, (__u64)jme->txring[0].dma & 0xFFFFFFFFUL);
1322 struct jme_ring *txring = &(jme->txring[0]);
1326 atomic_read(&txring->nr_free) >= (jme->tx_wake_threshold))) {
1337 struct jme_ring *txring = &(jme->txring[0]);
1338 struct txdesc *txdesc = txring->desc;
1339 struct jme_buffer_info *txbi = txring->bufinf, *ctxbi, *ttxbi;
1353 max = jme->tx_ring_size - atomic_read(&txring->nr_free);
1356 for (i = atomic_read(&txring->next_to_clean) ; cnt < max ; ) {
1406 atomic_set(&txring->next_to_clean, i);
1407 atomic_add(cnt, &txring->nr_free);
1700 struct jme_ring *txring = &(jme->txring[0]);
1703 idx = txring->next_to_use;
1706 if (unlikely(atomic_read(&txring->nr_free) < nr_alloc))
1709 atomic_sub(nr_alloc, &txring->nr_free);
1711 txring->next_to_use = (txring->next_to_use + nr_alloc) & mask;
1754 struct jme_ring *txring = &(jme->txring[0]);
1755 struct txdesc *txdesc = txring->desc, *ctxdesc;
1756 struct jme_buffer_info *txbi = txring->bufinf, *ctxbi;
1867 struct jme_ring *txring = &(jme->txring[0]);
1872 txdesc = (struct txdesc *)txring->desc + idx;
1873 txbi = txring->bufinf + idx;
1915 struct jme_ring *txring = &(jme->txring[0]);
1916 struct jme_buffer_info *txbi = txring->bufinf;
1917 int idx = atomic_read(&txring->next_to_clean);
1922 if (unlikely(atomic_read(&txring->nr_free) < (MAX_SKB_FRAGS+2))) {
1926 if (atomic_read(&txring->nr_free)