Subject: Re: CVS commit: syssrc
To: Matthew Jacob <mjacob@feral.com>
From: Jason R Thorpe <thorpej@zembu.com>
List: source-changes
Date: 02/23/2001 17:50:09
On Fri, Feb 23, 2001 at 05:38:58PM -0800, Matthew Jacob wrote:

 > Izumi is not correct about bus_dmamap_sync missing.

Uh, let's reread what I said:

 > > Izumi is correct -- BTW, since all NetBSD platforms that use this
 > > driver support bus_dma, how about putting all the bus_dma stuff into
 > > isp_netbsd.c?

...and what Izumi said:

 > >  > Can bus_dmamap_load*() functions take BUS_DMA_COHERENT flag?
 > >  > Isn't it valid for only bus_dmamem_[m]map() ?
 > >  > Anyway BUS_DMA_COHERENT flag is just a hint,
 > >  > so it should not be "required", I think.
 > >  > (bus_dmamap_sync() is missing in some place?)

In particular:

	Isn't it valid for only bus_dmamem_[m]map() ?

...which is correct.  BUS_DMA_COHERENT is not a valid flag to
bus_dmamap_load*(), only to bus_dmamem_[m]map.  He is also correct
that BUS_DMA_COHERENT is only a hint, so that back-end bus_dma
routines can perform some optimizations.  It should not be relied
upon for proper driver operation.  This is all spelled out both in
my original bus_dma paper (which is located in the source tree) and
in the bus_dma(9) manual page.

Also, Izumi wasn't telling you that bus_dmamap_sync() calls are
missing.  He was asking you about the possibility of that being
true (which is certainly a reasonable question, since BUS_DMA_COHERENT
should not be relied upon for proper driver operation).

Also, my "BTW" comment was just that -- a "by the way, could this be
done?"...

...there really wasn't any need to fly off the handle.

-- 
        -- Jason R. Thorpe <thorpej@zembu.com>