Subject: Re: kern/23808 SataLink 3114 fails to work with WD Raptor disks.
To: Chris Gilbert <chris@dokein.co.uk>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 05/08/2004 14:34:59
--KsGdsel6WgEHnImy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Sat, May 08, 2004 at 12:57:27PM +0100, Chris Gilbert wrote:
> I just tried to upgrade to 2.0_BETA and found that my system stopped
> booting, I reported this a while back, but just noticed the suggested
> fix in the PR, and in my -current tree to fix this isn't in CVS.
> 
> Could someone check the attached change? With the extra delay my system
> now boots.  (and my other systems that have also had the change also
> boot.

I don't like much arbitray delays like this in the code.
Can you try the attached diff instead ?

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--

--KsGdsel6WgEHnImy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff

Index: ata_wdc.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ata/ata_wdc.c,v
retrieving revision 1.53
diff -u -r1.53 ata_wdc.c
--- ata_wdc.c	2 Mar 2004 13:13:57 -0000	1.53
+++ ata_wdc.c	8 May 2004 12:32:43 -0000
@@ -303,6 +303,8 @@
 		 */
 		bus_space_write_1(chp->ctl_iot, chp->ctl_ioh, wd_aux_ctlr,
 		    WDCTL_4BIT);
+		if (wdcwait(chp, WDCS_DRDY, WDCS_DRDY, ATA_DELAY, wait_flags))
+			goto ctrltimeout;
 	}
 
 	_wdc_ata_bio_start(chp, xfer);

--KsGdsel6WgEHnImy--