Lines Matching defs:dma

1431 	atge_dma_t *dma;
1440 dma = atge_buf_alloc(r->r_atge, buflen, f);
1441 if (dma == NULL) {
1446 tbl[i] = dma;
1475 atge_dma_t *dma;
1477 dma = kmem_zalloc(sizeof (atge_dma_t), KM_SLEEP);
1480 DDI_DMA_SLEEP, NULL, &dma->hdl);
1488 err = ddi_dma_mem_alloc(dma->hdl,
1490 &dma->addr, &dma->len, &dma->acchdl);
1495 ddi_dma_free_handle(&dma->hdl);
1499 err = ddi_dma_addr_bind_handle(dma->hdl, NULL, dma->addr,
1500 dma->len, d | DDI_DMA_CONSISTENT, DDI_DMA_SLEEP,
1501 NULL, &dma->cookie, &dma->count);
1506 ddi_dma_mem_free(&dma->acchdl);
1507 ddi_dma_free_handle(&dma->hdl);
1511 return (dma);
1513 kmem_free(dma, sizeof (atge_dma_t));
1518 atge_free_a_dma_blk(atge_dma_t *dma)
1520 if (dma != NULL) {
1521 (void) ddi_dma_unbind_handle(dma->hdl);
1522 ddi_dma_mem_free(&dma->acchdl);
1523 ddi_dma_free_handle(&dma->hdl);
1524 kmem_free(dma, sizeof (atge_dma_t));
1531 atge_dma_t *dma = NULL;
1534 dma = kmem_zalloc(sizeof (atge_dma_t), KM_SLEEP);
1537 DDI_DMA_SLEEP, NULL, &dma->hdl);
1545 err = ddi_dma_mem_alloc(dma->hdl, len, &atge_buf_attr,
1546 DDI_DMA_STREAMING, DDI_DMA_SLEEP, NULL, &dma->addr,
1547 &dma->len, &dma->acchdl);
1552 ddi_dma_free_handle(&dma->hdl);
1556 err = ddi_dma_addr_bind_handle(dma->hdl, NULL, dma->addr, dma->len,
1557 (f | DDI_DMA_CONSISTENT), DDI_DMA_SLEEP, NULL, &dma->cookie,
1558 &dma->count);
1563 ddi_dma_mem_free(&dma->acchdl);
1564 ddi_dma_free_handle(&dma->hdl);
1571 ASSERT(dma->count == 1);
1573 return (dma);
1575 kmem_free(dma, sizeof (atge_dma_t));
1580 atge_buf_free(atge_dma_t *dma)
1582 ASSERT(dma != NULL);
1584 (void) ddi_dma_unbind_handle(dma->hdl);
1585 ddi_dma_mem_free(&dma->acchdl);
1586 ddi_dma_free_handle(&dma->hdl);
1587 kmem_free(dma, sizeof (atge_dma_t));
2069 ATGE_DB(("%s: %s() dma, counters programmed ", atgep->atge_name,