Lines Matching refs:txdr
627 struct e1000_tx_ring *txdr = adapter->tx_ring; in e1000_get_ringparam() local
637 ring->tx_pending = txdr->count; in e1000_get_ringparam()
648 struct e1000_tx_ring *txdr, *tx_old; in e1000_set_ringparam() local
668 txdr = kzalloc(tx_ring_size, GFP_KERNEL); in e1000_set_ringparam()
669 if (!txdr) in e1000_set_ringparam()
676 adapter->tx_ring = txdr; in e1000_set_ringparam()
684 txdr->count = max(ring->tx_pending,(uint32_t)E1000_MIN_TXD); in e1000_set_ringparam()
685 txdr->count = min(txdr->count,(uint32_t)(mac_type < e1000_82544 ? in e1000_set_ringparam()
687 E1000_ROUNDUP(txdr->count, REQ_TX_DESCRIPTOR_MULTIPLE); in e1000_set_ringparam()
690 txdr[i].count = txdr->count; in e1000_set_ringparam()
711 adapter->tx_ring = txdr; in e1000_set_ringparam()
725 kfree(txdr); in e1000_set_ringparam()
998 struct e1000_tx_ring *txdr = &adapter->test_tx_ring; in e1000_free_desc_rings() local
1003 if (txdr->desc && txdr->buffer_info) { in e1000_free_desc_rings()
1004 for (i = 0; i < txdr->count; i++) { in e1000_free_desc_rings()
1005 if (txdr->buffer_info[i].dma) in e1000_free_desc_rings()
1006 pci_unmap_single(pdev, txdr->buffer_info[i].dma, in e1000_free_desc_rings()
1007 txdr->buffer_info[i].length, in e1000_free_desc_rings()
1009 if (txdr->buffer_info[i].skb) in e1000_free_desc_rings()
1010 dev_kfree_skb(txdr->buffer_info[i].skb); in e1000_free_desc_rings()
1025 if (txdr->desc) { in e1000_free_desc_rings()
1026 pci_free_consistent(pdev, txdr->size, txdr->desc, txdr->dma); in e1000_free_desc_rings()
1027 txdr->desc = NULL; in e1000_free_desc_rings()
1034 kfree(txdr->buffer_info); in e1000_free_desc_rings()
1035 txdr->buffer_info = NULL; in e1000_free_desc_rings()
1045 struct e1000_tx_ring *txdr = &adapter->test_tx_ring; in e1000_setup_desc_rings() local
1053 if (!txdr->count) in e1000_setup_desc_rings()
1054 txdr->count = E1000_DEFAULT_TXD; in e1000_setup_desc_rings()
1056 size = txdr->count * sizeof(struct e1000_buffer); in e1000_setup_desc_rings()
1057 if (!(txdr->buffer_info = kmalloc(size, GFP_KERNEL))) { in e1000_setup_desc_rings()
1061 memset(txdr->buffer_info, 0, size); in e1000_setup_desc_rings()
1063 txdr->size = txdr->count * sizeof(struct e1000_tx_desc); in e1000_setup_desc_rings()
1064 E1000_ROUNDUP(txdr->size, 4096); in e1000_setup_desc_rings()
1065 if (!(txdr->desc = pci_alloc_consistent(pdev, txdr->size, &txdr->dma))) { in e1000_setup_desc_rings()
1069 memset(txdr->desc, 0, txdr->size); in e1000_setup_desc_rings()
1070 txdr->next_to_use = txdr->next_to_clean = 0; in e1000_setup_desc_rings()
1073 ((uint64_t) txdr->dma & 0x00000000FFFFFFFF)); in e1000_setup_desc_rings()
1074 E1000_WRITE_REG(&adapter->hw, TDBAH, ((uint64_t) txdr->dma >> 32)); in e1000_setup_desc_rings()
1076 txdr->count * sizeof(struct e1000_tx_desc)); in e1000_setup_desc_rings()
1084 for (i = 0; i < txdr->count; i++) { in e1000_setup_desc_rings()
1085 struct e1000_tx_desc *tx_desc = E1000_TX_DESC(*txdr, i); in e1000_setup_desc_rings()
1094 txdr->buffer_info[i].skb = skb; in e1000_setup_desc_rings()
1095 txdr->buffer_info[i].length = skb->len; in e1000_setup_desc_rings()
1096 txdr->buffer_info[i].dma = in e1000_setup_desc_rings()
1099 tx_desc->buffer_addr = cpu_to_le64(txdr->buffer_info[i].dma); in e1000_setup_desc_rings()
1492 struct e1000_tx_ring *txdr = &adapter->test_tx_ring; in e1000_run_loopback_test() local
1505 if (rxdr->count <= txdr->count) in e1000_run_loopback_test()
1506 lc = ((txdr->count / 64) * 2) + 1; in e1000_run_loopback_test()
1513 e1000_create_lbtest_frame(txdr->buffer_info[i].skb, in e1000_run_loopback_test()
1516 txdr->buffer_info[k].dma, in e1000_run_loopback_test()
1517 txdr->buffer_info[k].length, in e1000_run_loopback_test()
1519 if (unlikely(++k == txdr->count)) k = 0; in e1000_run_loopback_test()