Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Mar 2008 12:29:22 -0500 (CDT)
From:      Mark Tinguely <tinguely@casselton.net>
To:        freebsd-questions@freebsd.org, yonyossef.lists@gmail.com
Subject:   Re: bus_dmamem_alloc
Message-ID:  <200803201729.m2KHTMd8002539@casselton.net>
In-Reply-To: <20def4870803200908q63137451p7bf052337a2cc5e0@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>  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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803201729.m2KHTMd8002539>