From owner-freebsd-doc@FreeBSD.ORG Mon Feb 12 19:33:52 2007 Return-Path: X-Original-To: freebsd-doc@freebsd.org Delivered-To: freebsd-doc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5EB7516A478; Mon, 12 Feb 2007 19:33:52 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id 9321113C4A6; Mon, 12 Feb 2007 19:33:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id l1CJXkhC057290; Mon, 12 Feb 2007 14:33:46 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-drivers@freebsd.org Date: Mon, 12 Feb 2007 12:58:27 -0500 User-Agent: KMail/1.9.1 References: <200702111507.53789.jason.harmening@gmail.com> In-Reply-To: <200702111507.53789.jason.harmening@gmail.com> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200702121258.27638.jhb@freebsd.org> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Mon, 12 Feb 2007 14:33:46 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2559/Mon Feb 12 11:56:52 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Jason Harmening , freebsd-doc@freebsd.org Subject: Re: Inconsistency in bus_dma manpage? X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Feb 2007 19:33:52 -0000 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