Lines Matching refs:txp
1260 xnb_txbuf_recycle(xnb_txbuf_t *txp) in xnb_txbuf_recycle() argument
1262 xnb_t *xnbp = txp->xt_xnbp; in xnb_txbuf_recycle()
1264 kmem_cache_free(xnbp->xnb_tx_buf_cache, txp); in xnb_txbuf_recycle()
1273 xnb_txbuf_t *txp = buf; in xnb_txbuf_constructor() local
1279 txp->xt_free_rtn.free_func = xnb_txbuf_recycle; in xnb_txbuf_constructor()
1280 txp->xt_free_rtn.free_arg = (caddr_t)txp; in xnb_txbuf_constructor()
1281 txp->xt_xnbp = xnbp; in xnb_txbuf_constructor()
1282 txp->xt_next = NULL; in xnb_txbuf_constructor()
1285 0, 0, &txp->xt_dma_handle) != DDI_SUCCESS) in xnb_txbuf_constructor()
1288 if (ddi_dma_mem_alloc(txp->xt_dma_handle, PAGESIZE, &data_accattr, in xnb_txbuf_constructor()
1289 DDI_DMA_STREAMING, 0, 0, &txp->xt_buf, &len, in xnb_txbuf_constructor()
1290 &txp->xt_acc_handle) != DDI_SUCCESS) in xnb_txbuf_constructor()
1293 if (ddi_dma_addr_bind_handle(txp->xt_dma_handle, NULL, txp->xt_buf, in xnb_txbuf_constructor()
1300 txp->xt_mfn = xnb_btop(dma_cookie.dmac_laddress); in xnb_txbuf_constructor()
1301 txp->xt_buflen = dma_cookie.dmac_size; in xnb_txbuf_constructor()
1311 ddi_dma_mem_free(&txp->xt_acc_handle); in xnb_txbuf_constructor()
1314 ddi_dma_free_handle(&txp->xt_dma_handle); in xnb_txbuf_constructor()
1324 xnb_txbuf_t *txp = buf; in xnb_txbuf_destructor() local
1327 (void) ddi_dma_unbind_handle(txp->xt_dma_handle); in xnb_txbuf_destructor()
1328 ddi_dma_mem_free(&txp->xt_acc_handle); in xnb_txbuf_destructor()
1329 ddi_dma_free_handle(&txp->xt_dma_handle); in xnb_txbuf_destructor()
1465 xnb_txbuf_t *txp; in xnb_from_peer() local
1467 txp = kmem_cache_alloc(xnbp->xnb_tx_buf_cache, in xnb_from_peer()
1469 if (txp == NULL) in xnb_from_peer()
1472 txp->xt_mblk = desballoc((unsigned char *)txp->xt_buf, in xnb_from_peer()
1473 txp->xt_buflen, 0, &txp->xt_free_rtn); in xnb_from_peer()
1474 if (txp->xt_mblk == NULL) { in xnb_from_peer()
1475 kmem_cache_free(xnbp->xnb_tx_buf_cache, txp); in xnb_from_peer()
1479 txp->xt_idx = loop; in xnb_from_peer()
1480 txp->xt_id = txreq->id; in xnb_from_peer()
1486 cop->dest.u.gmfn = txp->xt_mfn; in xnb_from_peer()
1494 *txpp = txp; in xnb_from_peer()
1532 xnb_txbuf_t *txp = *txpp; in xnb_from_peer() local
1534 txreq = RING_GET_REQUEST(&xnbp->xnb_tx_ring, txp->xt_idx); in xnb_from_peer()
1542 xnb_tx_mark_complete(xnbp, txp->xt_id, NETIF_RSP_ERROR); in xnb_from_peer()
1543 freemsg(txp->xt_mblk); in xnb_from_peer()
1547 mp = txp->xt_mblk; in xnb_from_peer()
1548 mp->b_rptr = mp->b_wptr = (unsigned char *)txp->xt_buf; in xnb_from_peer()
1563 txp->xt_mblk = mp; in xnb_from_peer()
1578 xnb_tx_mark_complete(xnbp, txp->xt_id, NETIF_RSP_OKAY); in xnb_from_peer()