From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 25 14:03:02 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C984516A41F for ; Tue, 25 Oct 2005 14:03:02 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: from ns2.alphaque.com (ns2.alphaque.com [202.75.47.153]) by mx1.FreeBSD.org (Postfix) with SMTP id 45E6B43D62 for ; Tue, 25 Oct 2005 14:02:57 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: (qmail 61661 invoked by uid 0); 25 Oct 2005 14:02:55 -0000 Received: from lucifer.net-gw.com (HELO prophet.alphaque.com) (202.75.47.153) by lucifer.net-gw.com with SMTP; 25 Oct 2005 14:02:55 -0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by prophet.alphaque.com (8.13.4/8.13.4) with ESMTP id j9PE2irF025022; Tue, 25 Oct 2005 22:02:44 +0800 (MYT) (envelope-from dinesh@alphaque.com) Message-ID: <435E3B04.7060306@alphaque.com> Date: Tue, 25 Oct 2005 22:02:44 +0800 From: Dinesh Nair User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8b) Gecko/20050915 MIME-Version: 1.0 To: Dinesh Nair References: <435E3003.4050609@alphaque.com> In-Reply-To: <435E3003.4050609@alphaque.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: correct use of bus_dmamap_sync X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2005 14:03:02 -0000 On 10/25/05 21:15 Dinesh Nair said the following: > the pseudo code for the read and write, called during an interrupt > cycle, are: > > rx_func() > { > POSITION A > > while(there_is_some_data) { > memcpy(somebuf, readbuf) > } > POSITION B > } > > tx_func() > { > POSITION C > > while(there_is_some_data) { > memcpy(writebuf, somebuf) > } > POSITION D > } > > the question is, what op should i use for bus_dmamap_sync in positions > A, B, C and D ? responding to my own request, i mean which of BUS_DMASYNC_PREREAD, BUS_DMASYNC_POSTREAD, BUS_DMASYNC_PREWRITE, BUS_DMASYNC_POSTWRITE should i use, and where ? -- Regards, /\_/\ "All dogs go to heaven." dinesh@alphaque.com (0 0) http://www.alphaque.com/ +==========================----oOO--(_)--OOo----==========================+ | for a in past present future; do | | for b in clients employers associates relatives neighbours pets; do | | echo "The opinions here in no way reflect the opinions of my $a $b." | | done; done | +=========================================================================+