Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Jul 2003 19:14:41 -0700
From:      Hiten Pandya <hmp@FreeBSD.ORG>
To:        Andrew Gallatin <gallatin@cs.duke.edu>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: API change for bus_dma
Message-ID:  <20030713021441.GA21110@perrin.int.nxad.com>
In-Reply-To: <16124.43999.333761.397624@grasshopper.cs.duke.edu>
References:  <3EF3C12F.9060303@btc.adaptec.com> <16124.39930.142492.356163@grasshopper.cs.duke.edu> <3EFC9F2D.6020908@btc.adaptec.com> <16124.43999.333761.397624@grasshopper.cs.duke.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jun 27, 2003 at 04:41:03PM -0400, Andrew Gallatin wrote:
> 
> Scott Long writes:
>  > 
>  > As you hinted below, BUS_DMA_NOWAIT does what you want.  It will return
>  > ENOMEM to the caller if the bounce buffers cannot be pre-allocated
>  > during bus_dmamap_load().
> 
> OK, thanks.  I looks like sparc64 also returns ENOMEM if it runs out of
> sgmap space..
> 
> One more question: What's the FreeBSD equivalent of Solaris'
> DDI_DMA_CONSISTENT and DDI_DMA_STREAMING?

	As of now, the only one which comes to mind is NetBSD which
	supports such an equivalence; known as BUS_DMA_STREAMING.

	From what I can recall, the client sets the flag upon call of a
	DMA memory allocation or DMA load function.  The flag is to be
	used if the client is doing sequential, uni-directional
	transfers that are regulated by some sort of alignment and size
	constraint.  According to the NetBSD code, it also "takes
	advantage" of middle-man I/O cache hardware...  I am not sure if
	the NetBSD bus_dma assumes coherency or not.
	
	Only a very few platforms support this...

	For DDI_DMA_CONSISTENT, I think it would be BUS_DMA_COHERENT
	which is what you are looking for if I am reading the Solaris
	2.6 DDI docs correctly.

	Hope this helps in the slightest.

	Cheers.

		-- Hiten (hmp@FreeBSD.ORG)


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