bus_dmamem_alloc() and BUS_DMA_WAITOK

Patrick Lamaizière patfbsd at davenulle.org
Fri Feb 13 06:39:43 PST 2009


Hello,

I would like to know if it is safe to use the BUS_DMA_WAITOK flag with
bus_dmamem_alloc(), in the context of the device_attach routine? Many
drivers use BUS_DMA_NOWAIT.

I need a 32Ko buffer and on low memory my driver cannot attach
(bus_dmamem_alloc returns ENOMEM). Will BUS_DMA_WAITOK help in this
case?

Thanks in advance, regards.


More information about the freebsd-hackers mailing list