Subject: Re: Rev 1.19 of busdma.doc
To: John Kohl <jtk@kolvir.arlington.ma.us>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-kern
Date: 11/10/1996 18:20:13
On Sun, 10 Nov 1996 18:24:43 -0500 (EST) 
 John Kohl <jtk@kolvir.arlington.ma.us> wrote:

 > JT> 		typedef	int (*bus_dmamap_load_func_t) __P((bus_addr_t addr,
 > JT> 		    bus_size_t size, void *arg));

 > I think you need to pass wait/nowait flags here too--if
 > bus_dmamap_load() will be calling this function, it has to be able to
 > tell whether it's safe to wait (as specified in the bus_dmamap_create()
 > call).  (Either that, or specify that it must never wait.)

Perhaps I should clarify in the document... the driver callback (which
is what this is) should never block on resource allocation... it should
never block :-)  Any resources the driver needs should be allocated
before the call to bus_dmamap_load().  wait/nowait is passed to
bus_dmamap_load() because it may need to allocate e.g. a bounce buffer.

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                               Home: 408.866.1912
NAS: M/S 258-6                                          Work: 415.604.0935
Moffett Field, CA 94035                                Pager: 415.428.6939