From owner-freebsd-alpha Tue Oct 19 13:58:36 1999 Delivered-To: freebsd-alpha@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id DC83A14DCE; Tue, 19 Oct 1999 13:58:26 -0700 (PDT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.1/8.9.1) with ESMTP id QAA02928; Tue, 19 Oct 1999 16:58:18 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.9.3/8.9.1) id QAA02929; Tue, 19 Oct 1999 16:57:48 -0400 (EDT) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Tue, 19 Oct 1999 16:57:48 -0400 (EDT) To: "Erik H. Bakke" Cc: Soren Schmidt , alpha@FreeBSD.ORG, sos@FreeBSD.ORG, mjacob@feral.com Subject: Re: workaround for ata driver woes on alpha In-Reply-To: References: <199910181741.TAA99649@freebsd.dk> X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid Message-ID: <14348.55807.415236.565105@grasshopper.cs.duke.edu> Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Erik H. Bakke writes: > > On 18-Oct-99 Soren Schmidt wrote: > > It seems Andrew Gallatin wrote: > >> > >> We (a grad student here & I ) talked about this at lunch. We think we > >> might have a real fix. I'll pass it along after we test it. > > > > OK, I'll take a look at it, but no promises :) > > > I can give it a shot as well, as I have some 2 weeks of instability to compare > against. I finally got around to testing it & it seems to work. The appended patch is courtesy of Darrell Anderson (anderson@cs.duke.edu). I believe Matt's suggestion is probably the real fix. Also, we've seen this problem (albeit rarely) on PCs under extreme load as well. (450MHz PIII, 2 promise cards, 4 22GB IBM Deskstar drive as each channel's primary master, sinking data to/from a gigabit link to a number of clients) ------------------------------------------------------------------------------ Andrew Gallatin, Sr Systems Programmer http://www.cs.duke.edu/~gallatin Duke University Email: gallatin@cs.duke.edu Department of Computer Science Phone: (919) 660-6590 Index: ata-disk.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ata/ata-disk.c,v retrieving revision 1.32 diff -u -c -r1.32 ata-disk.c cvs diff: conflicting specifications of output style *** ata-disk.c 1999/10/18 17:55:38 1.32 --- ata-disk.c 1999/10/19 20:51:36 *************** *** 511,516 **** --- 511,527 ---- struct ad_softc *adp = request->device; int32_t dma_stat = 0; + /* + * watch for a race where ad_interrupt is called after ad_timeout + * has allready been committed to run. if that's the case, abort + * and let ad_timeout deal with reissuing the request. + */ + if (request->timeout_handle.callout && + !callout_pending(request->timeout_handle.callout)) { + printf("ad_interrupt: ad_timeout/ad_interrupt race detected. aborting.\n"); + return ATA_OP_CONTINUES; + } + /* finish DMA transfer */ if (request->flags & AR_F_DMA_USED) dma_stat = ata_dmadone(adp->controller); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message