Mark Tinguely tinguely at casselton.net
Thu Mar 20 10:29:24 PDT 2008

>  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?

Sure, you are allocating with BUS_DMA_NOWAIT. err is probably equal to ENOMEM.

If allocation size is larger than a PAGE_SIZE or specific alignment is
require then contigmalloc() is called to satisfy the allocation.
contigmalloc() can fail even when specifying WAITOK.

--Mark Tinguely.

More information about the freebsd-questions mailing list