Lines Matching refs:txp

1258 xnb_txbuf_recycle(xnb_txbuf_t *txp)  in xnb_txbuf_recycle()  argument
1260 xnb_t *xnbp = txp->xt_xnbp; in xnb_txbuf_recycle()
1262 kmem_cache_free(xnbp->xnb_tx_buf_cache, txp); in xnb_txbuf_recycle()
1271 xnb_txbuf_t *txp = buf; in xnb_txbuf_constructor() local
1277 txp->xt_free_rtn.free_func = xnb_txbuf_recycle; in xnb_txbuf_constructor()
1278 txp->xt_free_rtn.free_arg = (caddr_t)txp; in xnb_txbuf_constructor()
1279 txp->xt_xnbp = xnbp; in xnb_txbuf_constructor()
1280 txp->xt_next = NULL; in xnb_txbuf_constructor()
1283 0, 0, &txp->xt_dma_handle) != DDI_SUCCESS) in xnb_txbuf_constructor()
1286 if (ddi_dma_mem_alloc(txp->xt_dma_handle, PAGESIZE, &data_accattr, in xnb_txbuf_constructor()
1287 DDI_DMA_STREAMING, 0, 0, &txp->xt_buf, &len, in xnb_txbuf_constructor()
1288 &txp->xt_acc_handle) != DDI_SUCCESS) in xnb_txbuf_constructor()
1291 if (ddi_dma_addr_bind_handle(txp->xt_dma_handle, NULL, txp->xt_buf, in xnb_txbuf_constructor()
1298 txp->xt_mfn = xnb_btop(dma_cookie.dmac_laddress); in xnb_txbuf_constructor()
1299 txp->xt_buflen = dma_cookie.dmac_size; in xnb_txbuf_constructor()
1309 ddi_dma_mem_free(&txp->xt_acc_handle); in xnb_txbuf_constructor()
1312 ddi_dma_free_handle(&txp->xt_dma_handle); in xnb_txbuf_constructor()
1322 xnb_txbuf_t *txp = buf; in xnb_txbuf_destructor() local
1325 (void) ddi_dma_unbind_handle(txp->xt_dma_handle); in xnb_txbuf_destructor()
1326 ddi_dma_mem_free(&txp->xt_acc_handle); in xnb_txbuf_destructor()
1327 ddi_dma_free_handle(&txp->xt_dma_handle); in xnb_txbuf_destructor()
1463 xnb_txbuf_t *txp; in xnb_from_peer() local
1465 txp = kmem_cache_alloc(xnbp->xnb_tx_buf_cache, in xnb_from_peer()
1467 if (txp == NULL) in xnb_from_peer()
1470 txp->xt_mblk = desballoc((unsigned char *)txp->xt_buf, in xnb_from_peer()
1471 txp->xt_buflen, 0, &txp->xt_free_rtn); in xnb_from_peer()
1472 if (txp->xt_mblk == NULL) { in xnb_from_peer()
1473 kmem_cache_free(xnbp->xnb_tx_buf_cache, txp); in xnb_from_peer()
1477 txp->xt_idx = loop; in xnb_from_peer()
1478 txp->xt_id = txreq->id; in xnb_from_peer()
1484 cop->dest.u.gmfn = txp->xt_mfn; in xnb_from_peer()
1492 *txpp = txp; in xnb_from_peer()
1530 xnb_txbuf_t *txp = *txpp; in xnb_from_peer() local
1532 txreq = RING_GET_REQUEST(&xnbp->xnb_tx_ring, txp->xt_idx); in xnb_from_peer()
1540 xnb_tx_mark_complete(xnbp, txp->xt_id, NETIF_RSP_ERROR); in xnb_from_peer()
1541 freemsg(txp->xt_mblk); in xnb_from_peer()
1545 mp = txp->xt_mblk; in xnb_from_peer()
1546 mp->b_rptr = mp->b_wptr = (unsigned char *)txp->xt_buf; in xnb_from_peer()
1561 txp->xt_mblk = mp; in xnb_from_peer()
1576 xnb_tx_mark_complete(xnbp, txp->xt_id, NETIF_RSP_OKAY); in xnb_from_peer()