From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 25 17:02:54 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 1B7B316A41F for ; Tue, 25 Oct 2005 17:02:54 +0000 (GMT) (envelope-from Vijay.Singh@netapp.com) Received: from mx1.netapp.com (mx1.netapp.com [216.240.18.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id CAF5343D53 for ; Tue, 25 Oct 2005 17:02:47 +0000 (GMT) (envelope-from Vijay.Singh@netapp.com) Received: from smtp1.corp.netapp.com ([10.57.156.124]) by mx1.netapp.com with ESMTP; 25 Oct 2005 10:02:47 -0700 X-IronPort-AV: i="3.97,250,1125903600"; d="scan'208"; a="263307956:sNHT18029304" Received: from svlexc02.hq.netapp.com (svlexc02.corp.netapp.com [10.57.157.136]) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id j9PH2kpI017657; Tue, 25 Oct 2005 10:02:46 -0700 (PDT) Received: from exsvl01.hq.netapp.com ([10.56.8.45]) by svlexc02.hq.netapp.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 25 Oct 2005 10:02:46 -0700 Received: from magenta.hq.netapp.com ([10.56.11.84]) by exsvl01.hq.netapp.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 25 Oct 2005 10:02:46 -0700 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Tue, 25 Oct 2005 10:02:45 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Message-ID: <637A278D8D0DBC438EA5E75C6E1818B9063C0E64@magenta.hq.netapp.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: correct use of bus_dmamap_sync Thread-Index: AcXZbOaGhsPWuqJEQD6zNdhZskKULAAGPqRw From: "Singh, Vijay" To: "Dinesh Nair" X-OriginalArrivalTime: 25 Oct 2005 17:02:46.0074 (UTC) FILETIME=[EBDA09A0:01C5D985] X-Mailman-Approved-At: Tue, 25 Oct 2005 17:27:10 +0000 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 17:02:54 -0000 man bus_dma(9) > -----Original Message----- > From: Dinesh Nair [mailto:dinesh@alphaque.com]=20 > Sent: Tuesday, October 25, 2005 7:03 AM > To: Dinesh Nair > Cc: freebsd-hackers@freebsd.org > Subject: Re: correct use of bus_dmamap_sync >=20 >=20 >=20 > On 10/25/05 21:15 Dinesh Nair said the following: > > the pseudo code for the read and write, called during an interrupt=20 > > cycle, are: > >=20 > > rx_func() > > { > > POSITION A > >=20 > > while(there_is_some_data) { > > memcpy(somebuf, readbuf) > > } > > POSITION B > > } > >=20 > > tx_func() > > { > > POSITION C > >=20 > > while(there_is_some_data) { > > memcpy(writebuf, somebuf) > > } > > POSITION D > > } > >=20 > > the question is, what op should i use for bus_dmamap_sync=20 > in positions=20 > > A, B, C and D ? >=20 > responding to my own request, i mean which of=20 > BUS_DMASYNC_PREREAD, BUS_DMASYNC_POSTREAD,=20 > BUS_DMASYNC_PREWRITE, BUS_DMASYNC_POSTWRITE should i use, and where ? >=20 > --=20 > Regards, /\_/\ "All dogs go to heaven." > dinesh@alphaque.com (0 0) http://www.alphaque.com/ > = +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D----oOO--(_)--OOo----=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +=3D=3D+ > | for a in past present future; do =20 > | > | for b in clients employers associates relatives=20 > neighbours pets; do | > | echo "The opinions here in no way reflect the opinions of=20 > my $a $b." | > | done; done =20 > | > = +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +=3D=3D+ > _______________________________________________ > freebsd-hackers@freebsd.org mailing list=20 > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to=20 > "freebsd-hackers-unsubscribe@freebsd.org" >=20