Date: Thu, 12 Aug 2004 14:43:10 -0600 From: "Justin T. Gibbs" <gibbs@scsiguy.com> To: Thomas Moestl <t.moestl@tu-bs.de>, John-Mark Gurney <gurney_j@resnet.uoregon.edu> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/share/man/man9 bus_dma.9 Message-ID: <2CA8968CB91C695E852DB6E3@aslan.scsiguy.com> In-Reply-To: <20040812011010.GA4799@timesink.dyndns.org> References: <200408111452.i7BEqXg8071621@repoman.freebsd.org> <20040811150458.GU991@funkthat.com> <20040812011010.GA4799@timesink.dyndns.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> NetBSD has a nice clarification: > Synchronization operations are expressed from the perspective of > the host RAM, e.g., a device -> memory operation is a READ and a > memory -> device operation is a WRITE. > > I think that something of that variety is required, since there are > always the two opposite meanings of "reading from" and "reading into". First off, yes, our code is compatible with the NetBSD semantics. While their description is perhaps more accurate, I believe that the API as currently defined and the above description are still confusing. If the API is from the perspective of the memory, then a WRITE would mean the memory is updated by the operation, but it is not. Perhaps a better way to describe the current semantics is from the perspective of a "backing store". If you are writing a packet to the wire, you perform a PREWRITE. If you are reading a packet from the wire, you perform a PREREAD. A filesystem write requires the SCSI controller to use a PREWRITE primative. A filesystem read requires the SCSI controller to use PREREAD. etc. I believe this was the intention of the original API. In the long run, I'd like to come up with API names that are from the perspective of the DMA engine doing the work. These names should be different enough from the current API names so that the old API can be retained for compatibility with NetBSD and OpenBSD. I think that is the only way to really end the confusion. -- Justin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2CA8968CB91C695E852DB6E3>