From owner-freebsd-hackers Wed May 17 13:26: 1 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 0A1EA37BD2D for ; Wed, 17 May 2000 13:25:59 -0700 (PDT) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e4HKwrN21059; Wed, 17 May 2000 13:58:53 -0700 (PDT) Date: Wed, 17 May 2000 13:58:53 -0700 From: Alfred Perlstein To: Jin Guojun Cc: hackers@FreeBSD.ORG Subject: Re: How to make system Sync Message-ID: <20000517135853.E14968@fw.wintelcom.net> References: <200005171900.MAA05337@george.lbl.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <200005171900.MAA05337@george.lbl.gov>; from jin@george.lbl.gov on Wed, May 17, 2000 at 12:00:24PM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Jin Guojun [000517 12:34] wrote: > I had a couple of system out of sync problems. > > (1) PCI sync problem: > ATM adapter updates a buffer return pointer and generates intr, > but when driver pulls out the information that updated by adapter, > some memory in the last piece of the pool is garbage. > e.g. > head -> c0100000 > tail -> c0100400 > > c0100000 -> buf0 > c0100004 -> buf1 > ... > c0100100 -> bufn > ... > c0100160 -> bad address or 0 > ... > > If I let driver tsleep() for a while, the problem can be improved. > So, it looks like that adapter pushed (DMA) the data into memory, > but not been seen by CPU right way due to the DMA sync issue. > How can we sync the DMA transaction in BSD? I think the way you accomplish this is by telling the adapter to generate an interrupt when it's completed its DMA operation, you seem to be generating interupts at the start instead of the end. -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message