Lines Matching refs:tx_ring
696 adapter->tx_ring->count = new_tx_count; in e1000_set_ringparam()
731 memcpy(temp_tx, adapter->tx_ring, size); in e1000_set_ringparam()
747 e1000e_free_tx_resources(adapter->tx_ring); in e1000_set_ringparam()
748 memcpy(adapter->tx_ring, temp_tx, size); in e1000_set_ringparam()
1114 struct e1000_ring *tx_ring = &adapter->test_tx_ring; in e1000_free_desc_rings() local
1120 if (tx_ring->desc && tx_ring->buffer_info) { in e1000_free_desc_rings()
1121 for (i = 0; i < tx_ring->count; i++) { in e1000_free_desc_rings()
1122 buffer_info = &tx_ring->buffer_info[i]; in e1000_free_desc_rings()
1147 if (tx_ring->desc) { in e1000_free_desc_rings()
1148 dma_free_coherent(&pdev->dev, tx_ring->size, tx_ring->desc, in e1000_free_desc_rings()
1149 tx_ring->dma); in e1000_free_desc_rings()
1150 tx_ring->desc = NULL; in e1000_free_desc_rings()
1158 kfree(tx_ring->buffer_info); in e1000_free_desc_rings()
1159 tx_ring->buffer_info = NULL; in e1000_free_desc_rings()
1166 struct e1000_ring *tx_ring = &adapter->test_tx_ring; in e1000_setup_desc_rings() local
1176 if (!tx_ring->count) in e1000_setup_desc_rings()
1177 tx_ring->count = E1000_DEFAULT_TXD; in e1000_setup_desc_rings()
1179 tx_ring->buffer_info = kcalloc(tx_ring->count, in e1000_setup_desc_rings()
1181 if (!tx_ring->buffer_info) { in e1000_setup_desc_rings()
1186 tx_ring->size = tx_ring->count * sizeof(struct e1000_tx_desc); in e1000_setup_desc_rings()
1187 tx_ring->size = ALIGN(tx_ring->size, 4096); in e1000_setup_desc_rings()
1188 tx_ring->desc = dma_alloc_coherent(&pdev->dev, tx_ring->size, in e1000_setup_desc_rings()
1189 &tx_ring->dma, GFP_KERNEL); in e1000_setup_desc_rings()
1190 if (!tx_ring->desc) { in e1000_setup_desc_rings()
1194 tx_ring->next_to_use = 0; in e1000_setup_desc_rings()
1195 tx_ring->next_to_clean = 0; in e1000_setup_desc_rings()
1197 ew32(TDBAL(0), ((u64)tx_ring->dma & 0x00000000FFFFFFFF)); in e1000_setup_desc_rings()
1198 ew32(TDBAH(0), ((u64)tx_ring->dma >> 32)); in e1000_setup_desc_rings()
1199 ew32(TDLEN(0), tx_ring->count * sizeof(struct e1000_tx_desc)); in e1000_setup_desc_rings()
1206 for (i = 0; i < tx_ring->count; i++) { in e1000_setup_desc_rings()
1207 struct e1000_tx_desc *tx_desc = E1000_TX_DESC(*tx_ring, i); in e1000_setup_desc_rings()
1217 tx_ring->buffer_info[i].skb = skb; in e1000_setup_desc_rings()
1218 tx_ring->buffer_info[i].length = skb->len; in e1000_setup_desc_rings()
1219 tx_ring->buffer_info[i].dma = in e1000_setup_desc_rings()
1223 tx_ring->buffer_info[i].dma)) { in e1000_setup_desc_rings()
1227 tx_desc->buffer_addr = cpu_to_le64(tx_ring->buffer_info[i].dma); in e1000_setup_desc_rings()
1607 struct e1000_ring *tx_ring = &adapter->test_tx_ring; in e1000_run_loopback_test() local
1625 if (rx_ring->count <= tx_ring->count) in e1000_run_loopback_test()
1626 lc = ((tx_ring->count / 64) * 2) + 1; in e1000_run_loopback_test()
1636 buffer_info = &tx_ring->buffer_info[k]; in e1000_run_loopback_test()
1644 if (k == tx_ring->count) in e1000_run_loopback_test()