Lines Matching refs:tpbuf

604 		struct emac_buffer *tpbuf = GET_TPD_BUFFER(tx_q, i);  in emac_tx_q_descs_free()  local
606 if (tpbuf->dma_addr) { in emac_tx_q_descs_free()
608 tpbuf->dma_addr, tpbuf->length, in emac_tx_q_descs_free()
610 tpbuf->dma_addr = 0; in emac_tx_q_descs_free()
612 if (tpbuf->skb) { in emac_tx_q_descs_free()
613 dev_kfree_skb_any(tpbuf->skb); in emac_tx_q_descs_free()
614 tpbuf->skb = NULL; in emac_tx_q_descs_free()
1191 struct emac_buffer *tpbuf; in emac_mac_tx_process() local
1196 tpbuf = GET_TPD_BUFFER(tx_q, tx_q->tpd.consume_idx); in emac_mac_tx_process()
1197 if (tpbuf->dma_addr) { in emac_mac_tx_process()
1199 tpbuf->dma_addr, tpbuf->length, in emac_mac_tx_process()
1201 tpbuf->dma_addr = 0; in emac_mac_tx_process()
1204 if (tpbuf->skb) { in emac_mac_tx_process()
1206 bytes_compl += tpbuf->skb->len; in emac_mac_tx_process()
1207 dev_kfree_skb_irq(tpbuf->skb); in emac_mac_tx_process()
1208 tpbuf->skb = NULL; in emac_mac_tx_process()
1345 struct emac_buffer *tpbuf = NULL; in emac_tx_fill_tpd() local
1355 tpbuf = GET_TPD_BUFFER(tx_q, tx_q->tpd.produce_idx); in emac_tx_fill_tpd()
1356 tpbuf->length = mapped_len; in emac_tx_fill_tpd()
1357 tpbuf->dma_addr = dma_map_page(adpt->netdev->dev.parent, in emac_tx_fill_tpd()
1360 tpbuf->length, in emac_tx_fill_tpd()
1363 tpbuf->dma_addr); in emac_tx_fill_tpd()
1367 TPD_BUFFER_ADDR_L_SET(tpd, lower_32_bits(tpbuf->dma_addr)); in emac_tx_fill_tpd()
1368 TPD_BUFFER_ADDR_H_SET(tpd, upper_32_bits(tpbuf->dma_addr)); in emac_tx_fill_tpd()
1369 TPD_BUF_LEN_SET(tpd, tpbuf->length); in emac_tx_fill_tpd()
1375 tpbuf = GET_TPD_BUFFER(tx_q, tx_q->tpd.produce_idx); in emac_tx_fill_tpd()
1376 tpbuf->length = len - mapped_len; in emac_tx_fill_tpd()
1377 tpbuf->dma_addr = dma_map_page(adpt->netdev->dev.parent, in emac_tx_fill_tpd()
1382 tpbuf->length, DMA_TO_DEVICE); in emac_tx_fill_tpd()
1384 tpbuf->dma_addr); in emac_tx_fill_tpd()
1388 TPD_BUFFER_ADDR_L_SET(tpd, lower_32_bits(tpbuf->dma_addr)); in emac_tx_fill_tpd()
1389 TPD_BUFFER_ADDR_H_SET(tpd, upper_32_bits(tpbuf->dma_addr)); in emac_tx_fill_tpd()
1390 TPD_BUF_LEN_SET(tpd, tpbuf->length); in emac_tx_fill_tpd()
1400 tpbuf = GET_TPD_BUFFER(tx_q, tx_q->tpd.produce_idx); in emac_tx_fill_tpd()
1401 tpbuf->length = frag->size; in emac_tx_fill_tpd()
1402 tpbuf->dma_addr = dma_map_page(adpt->netdev->dev.parent, in emac_tx_fill_tpd()
1404 tpbuf->length, DMA_TO_DEVICE); in emac_tx_fill_tpd()
1406 tpbuf->dma_addr); in emac_tx_fill_tpd()
1410 TPD_BUFFER_ADDR_L_SET(tpd, lower_32_bits(tpbuf->dma_addr)); in emac_tx_fill_tpd()
1411 TPD_BUFFER_ADDR_H_SET(tpd, upper_32_bits(tpbuf->dma_addr)); in emac_tx_fill_tpd()
1412 TPD_BUF_LEN_SET(tpd, tpbuf->length); in emac_tx_fill_tpd()
1424 tpbuf->skb = skb; in emac_tx_fill_tpd()
1433 tpbuf = GET_TPD_BUFFER(tx_q, first); in emac_tx_fill_tpd()
1434 dma_unmap_page(adpt->netdev->dev.parent, tpbuf->dma_addr, in emac_tx_fill_tpd()
1435 tpbuf->length, DMA_TO_DEVICE); in emac_tx_fill_tpd()
1436 tpbuf->dma_addr = 0; in emac_tx_fill_tpd()
1437 tpbuf->length = 0; in emac_tx_fill_tpd()