Date: Mon, 12 Feb 2007 12:58:27 -0500 From: John Baldwin <jhb@freebsd.org> To: freebsd-drivers@freebsd.org Cc: Jason Harmening <jason.harmening@gmail.com>, freebsd-doc@freebsd.org Subject: Re: Inconsistency in bus_dma manpage? Message-ID: <200702121258.27638.jhb@freebsd.org> In-Reply-To: <200702111507.53789.jason.harmening@gmail.com> References: <200702111507.53789.jason.harmening@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 11 February 2007 16:07, Jason Harmening wrote: > In the busdma_sync_op_t section of the bus_dma manpage, the sync operations > are described as follows: > > BUS_DMASYNC_PREREAD Perform any synchronization required > prior to an update of host memory by the > DMA read operation. > > BUS_DMASYNC_PREWRITE Perform any synchronization required > after an update of host memory by the CPU > and prior to DMA write operations. > > BUS_DMASYNC_POSTREAD Perform any synchronization required > after DMA read operations and prior to > CPU access to host memory. > > BUS_DMASYNC_POSTWRITE Perform any synchronization required > after DMA write operations. > > Makes sense...But in the section describing bus_dmamap_load, the following > example is given: > > For example, > the CPU might be used to setup the contents of a buffer that is > to be DMA'ed into a device. To ensure that the data are visible > via the device's mapping of that memory, the buffer must be > loaded and a dma sync operation of BUS_DMASYNC_PREREAD must be > performed. > > > I believe the example is incorrect--it's actually describing the case where > BUS_DMASYNC_PREWRITE would be necessary. This is fixed in at least HEAD as of several months ago. Which OS release are you on? Hmm, I've gone ahead and merged the updates to RELENG_6, but 6.2 and earlier are going to have the wrong text. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702121258.27638.jhb>