bus_dmamem_alloc

Mr Y yonyossef.lists at gmail.com
Thu Mar 20 09:36:12 PDT 2008


I'm trying to use bus_dmamem_alloc. The function man says:

    /*
     * Allocate a piece of memory that can be efficiently mapped into
     * bus device space based on the constraints listed in the dma tag.
     * A dmamap to for use with dmamap_load is also allocated.
     */

so I'm running:

err =
bus_dmamem_alloc(ring->dma_tag, &ring->buf,
BUS_DMA_NOWAIT|BUS_DMA_ALLOCNOW, &ring->dma_map);

but after calling bus_dmamem_allloc the dma_map variable is still NULL. is
this OK?

Thx, Yony


More information about the freebsd-questions mailing list