Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Oct 1999 16:57:48 -0400 (EDT)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        "Erik H. Bakke" <erik@habatech.no>
Cc:        Soren Schmidt <sos@freebsd.dk>, alpha@FreeBSD.ORG, sos@FreeBSD.ORG, mjacob@feral.com
Subject:   Re: workaround for ata driver woes on alpha
Message-ID:  <14348.55807.415236.565105@grasshopper.cs.duke.edu>
In-Reply-To: <XFMail.991019093219.erik@habatech.no>
References:  <199910181741.TAA99649@freebsd.dk> <XFMail.991019093219.erik@habatech.no>

next in thread | previous in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14348.55807.415236.565105>