Lines Matching defs:txring
558 struct pasemi_mac_txring *txring = tx_ring(mac);
565 start = txring->next_to_clean;
566 limit = txring->next_to_fill;
573 info = &txring->ring_info[(i+1) & (TX_RING_SIZE-1)];
577 dmas[j] = txring->ring_info[(i+1+j) &
585 kfree(txring->ring_info);
586 pasemi_dma_free_chan(&txring->chan);
862 static int pasemi_mac_clean_tx(struct pasemi_mac_txring *txring)
864 struct pasemi_dmachan *chan = &txring->chan;
865 struct pasemi_mac *mac = txring->mac;
879 spin_lock_irqsave(&txring->lock, flags);
881 start = txring->next_to_clean;
882 ring_limit = txring->next_to_fill;
884 prefetch(&TX_DESC_INFO(txring, start+1).skb);
896 u64 mactx = TX_DESC(txring, i);
905 TX_DESC(txring, i) = 0;
906 TX_DESC(txring, i+1) = 0;
911 skb = TX_DESC_INFO(txring, i+1).skb;
912 nr_frags = TX_DESC_INFO(txring, i).dma;
926 dmas[descr_count][j] = TX_DESC_INFO(txring, i+1+j).dma;
931 TX_DESC(txring, i) = 0;
932 TX_DESC(txring, i+1) = 0;
936 txring->next_to_clean = i & (TX_RING_SIZE-1);
938 spin_unlock_irqrestore(&txring->lock, flags);
985 struct pasemi_mac_txring *txring = (struct pasemi_mac_txring *)data;
986 struct pasemi_mac *mac = txring->mac;
988 pasemi_mac_clean_tx(txring);
990 mod_timer(&txring->clean_timer, jiffies + TX_CLEAN_INTERVAL);
997 struct pasemi_mac_txring *txring = data;
998 const struct pasemi_dmachan *chan = &txring->chan;
999 struct pasemi_mac *mac = txring->mac;
1012 mod_timer(&txring->clean_timer, jiffies + (TX_CLEAN_INTERVAL)*2);
1392 struct pasemi_mac_txring *txring,
1464 fill = txring->next_to_fill;
1465 TX_DESC(txring, fill++) = CTRL_CMD_T | CTRL_CMD_META_EVT | CTRL_CMD_O |
1467 TX_DESC(txring, fill++) = 0;
1468 TX_DESC(txring, fill++) = CTRL_CMD_T | CTRL_CMD_META_EVT | CTRL_CMD_O |
1470 TX_DESC(txring, fill++) = 0;
1471 txring->next_to_fill = fill;
1473 write_dma_reg(PAS_DMA_TXCHAN_INCR(txring->chan.chno), 2);
1479 struct pasemi_mac_txring * const txring = tx_ring(mac);
1491 prefetch(&txring->ring_info);
1535 spin_lock_irqsave(&txring->lock, flags);
1541 if (RING_AVAIL(txring) < nfrags + 14) {
1552 pasemi_mac_queue_csdesc(skb, map, map_size, txring, csring);
1555 fill = txring->next_to_fill;
1556 TX_DESC(txring, fill) = mactx;
1557 TX_DESC_INFO(txring, fill).dma = nfrags;
1559 TX_DESC_INFO(txring, fill).skb = skb;
1561 TX_DESC(txring, fill+i) =
1563 TX_DESC_INFO(txring, fill+i).dma = map[i];
1573 txring->next_to_fill = (fill + nfrags + 1) & (TX_RING_SIZE-1);
1578 spin_unlock_irqrestore(&txring->lock, flags);
1580 write_dma_reg(PAS_DMA_TXCHAN_INCR(txring->chan.chno), (nfrags+2) >> 1);
1585 spin_unlock_irqrestore(&txring->lock, flags);