Lines Matching defs:txdr
597 struct e1000_tx_ring *txdr = adapter->tx_ring;
607 ring->tx_pending = txdr->count;
618 struct e1000_tx_ring *txdr, *tx_old;
635 txdr = kcalloc(adapter->num_tx_queues, sizeof(struct e1000_tx_ring), GFP_KERNEL);
636 if (!txdr)
643 adapter->tx_ring = txdr;
651 txdr->count = max(ring->tx_pending,(u32)E1000_MIN_TXD);
652 txdr->count = min(txdr->count,(u32)(mac_type < e1000_82544 ?
654 txdr->count = ALIGN(txdr->count, REQ_TX_DESCRIPTOR_MULTIPLE);
657 txdr[i].count = txdr->count;
680 adapter->tx_ring = txdr;
695 kfree(txdr);
975 struct e1000_tx_ring *txdr = &adapter->test_tx_ring;
980 if (txdr->desc && txdr->buffer_info) {
981 for (i = 0; i < txdr->count; i++) {
982 if (txdr->buffer_info[i].dma)
984 txdr->buffer_info[i].dma,
985 txdr->buffer_info[i].length,
987 if (txdr->buffer_info[i].skb)
988 dev_kfree_skb(txdr->buffer_info[i].skb);
1004 if (txdr->desc) {
1005 dma_free_coherent(&pdev->dev, txdr->size, txdr->desc,
1006 txdr->dma);
1007 txdr->desc = NULL;
1015 kfree(txdr->buffer_info);
1016 txdr->buffer_info = NULL;
1024 struct e1000_tx_ring *txdr = &adapter->test_tx_ring;
1032 if (!txdr->count)
1033 txdr->count = E1000_DEFAULT_TXD;
1035 txdr->buffer_info = kcalloc(txdr->count, sizeof(struct e1000_buffer),
1037 if (!txdr->buffer_info) {
1042 txdr->size = txdr->count * sizeof(struct e1000_tx_desc);
1043 txdr->size = ALIGN(txdr->size, 4096);
1044 txdr->desc = dma_alloc_coherent(&pdev->dev, txdr->size, &txdr->dma,
1046 if (!txdr->desc) {
1050 memset(txdr->desc, 0, txdr->size);
1051 txdr->next_to_use = txdr->next_to_clean = 0;
1053 ew32(TDBAL, ((u64)txdr->dma & 0x00000000FFFFFFFF));
1054 ew32(TDBAH, ((u64)txdr->dma >> 32));
1055 ew32(TDLEN, txdr->count * sizeof(struct e1000_tx_desc));
1062 for (i = 0; i < txdr->count; i++) {
1063 struct e1000_tx_desc *tx_desc = E1000_TX_DESC(*txdr, i);
1073 txdr->buffer_info[i].skb = skb;
1074 txdr->buffer_info[i].length = skb->len;
1075 txdr->buffer_info[i].dma =
1078 tx_desc->buffer_addr = cpu_to_le64(txdr->buffer_info[i].dma);
1428 struct e1000_tx_ring *txdr = &adapter->test_tx_ring;
1441 if (rxdr->count <= txdr->count)
1442 lc = ((txdr->count / 64) * 2) + 1;
1449 e1000_create_lbtest_frame(txdr->buffer_info[i].skb,
1452 txdr->buffer_info[k].dma,
1453 txdr->buffer_info[k].length,
1455 if (unlikely(++k == txdr->count)) k = 0;