Lines Matching refs:tpbuf
596 struct emac_buffer *tpbuf = GET_TPD_BUFFER(tx_q, i); in emac_tx_q_descs_free() local
598 if (tpbuf->dma_addr) { in emac_tx_q_descs_free()
600 tpbuf->dma_addr, tpbuf->length, in emac_tx_q_descs_free()
602 tpbuf->dma_addr = 0; in emac_tx_q_descs_free()
604 if (tpbuf->skb) { in emac_tx_q_descs_free()
605 dev_kfree_skb_any(tpbuf->skb); in emac_tx_q_descs_free()
606 tpbuf->skb = NULL; in emac_tx_q_descs_free()
1183 struct emac_buffer *tpbuf; in emac_mac_tx_process() local
1188 tpbuf = GET_TPD_BUFFER(tx_q, tx_q->tpd.consume_idx); in emac_mac_tx_process()
1189 if (tpbuf->dma_addr) { in emac_mac_tx_process()
1191 tpbuf->dma_addr, tpbuf->length, in emac_mac_tx_process()
1193 tpbuf->dma_addr = 0; in emac_mac_tx_process()
1196 if (tpbuf->skb) { in emac_mac_tx_process()
1198 bytes_compl += tpbuf->skb->len; in emac_mac_tx_process()
1199 dev_consume_skb_irq(tpbuf->skb); in emac_mac_tx_process()
1200 tpbuf->skb = NULL; in emac_mac_tx_process()
1334 struct emac_buffer *tpbuf = NULL; in emac_tx_fill_tpd() local
1344 tpbuf = GET_TPD_BUFFER(tx_q, tx_q->tpd.produce_idx); in emac_tx_fill_tpd()
1345 tpbuf->length = mapped_len; in emac_tx_fill_tpd()
1346 tpbuf->dma_addr = dma_map_page(adpt->netdev->dev.parent, in emac_tx_fill_tpd()
1349 tpbuf->length, in emac_tx_fill_tpd()
1352 tpbuf->dma_addr); in emac_tx_fill_tpd()
1356 TPD_BUFFER_ADDR_L_SET(tpd, lower_32_bits(tpbuf->dma_addr)); in emac_tx_fill_tpd()
1357 TPD_BUFFER_ADDR_H_SET(tpd, upper_32_bits(tpbuf->dma_addr)); in emac_tx_fill_tpd()
1358 TPD_BUF_LEN_SET(tpd, tpbuf->length); in emac_tx_fill_tpd()
1364 tpbuf = GET_TPD_BUFFER(tx_q, tx_q->tpd.produce_idx); in emac_tx_fill_tpd()
1365 tpbuf->length = len - mapped_len; in emac_tx_fill_tpd()
1366 tpbuf->dma_addr = dma_map_page(adpt->netdev->dev.parent, in emac_tx_fill_tpd()
1371 tpbuf->length, DMA_TO_DEVICE); in emac_tx_fill_tpd()
1373 tpbuf->dma_addr); in emac_tx_fill_tpd()
1377 TPD_BUFFER_ADDR_L_SET(tpd, lower_32_bits(tpbuf->dma_addr)); in emac_tx_fill_tpd()
1378 TPD_BUFFER_ADDR_H_SET(tpd, upper_32_bits(tpbuf->dma_addr)); in emac_tx_fill_tpd()
1379 TPD_BUF_LEN_SET(tpd, tpbuf->length); in emac_tx_fill_tpd()
1387 tpbuf = GET_TPD_BUFFER(tx_q, tx_q->tpd.produce_idx); in emac_tx_fill_tpd()
1388 tpbuf->length = skb_frag_size(frag); in emac_tx_fill_tpd()
1389 tpbuf->dma_addr = skb_frag_dma_map(adpt->netdev->dev.parent, in emac_tx_fill_tpd()
1390 frag, 0, tpbuf->length, in emac_tx_fill_tpd()
1393 tpbuf->dma_addr); in emac_tx_fill_tpd()
1397 TPD_BUFFER_ADDR_L_SET(tpd, lower_32_bits(tpbuf->dma_addr)); in emac_tx_fill_tpd()
1398 TPD_BUFFER_ADDR_H_SET(tpd, upper_32_bits(tpbuf->dma_addr)); in emac_tx_fill_tpd()
1399 TPD_BUF_LEN_SET(tpd, tpbuf->length); in emac_tx_fill_tpd()
1411 tpbuf->skb = skb; in emac_tx_fill_tpd()
1420 tpbuf = GET_TPD_BUFFER(tx_q, first); in emac_tx_fill_tpd()
1421 dma_unmap_page(adpt->netdev->dev.parent, tpbuf->dma_addr, in emac_tx_fill_tpd()
1422 tpbuf->length, DMA_TO_DEVICE); in emac_tx_fill_tpd()
1423 tpbuf->dma_addr = 0; in emac_tx_fill_tpd()
1424 tpbuf->length = 0; in emac_tx_fill_tpd()