Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Dec 1999 05:51:14 +0800
From:      Peter Wemm <peter@netplex.com.au>
To:        Theo van Klaveren <havoc@phoenix.student.utwente.nl>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Problems with the ATA-driver 
Message-ID:  <19991221215114.977C71CCE@overcee.netplex.com.au>
In-Reply-To: Message from Theo van Klaveren <havoc@phoenix.student.utwente.nl>  of "Tue, 21 Dec 1999 15:42:44 %2B0100." <Pine.BSF.4.21.9912211530530.32016-100000@Cal30B054.student.utwente.nl> 

next in thread | previous in thread | raw e-mail | index | archive | help
Theo van Klaveren wrote:
> 
> When installing the 08-dec-1999 snapshot (before ATA went in GENERIC),
>  a recompile from the kernel with the ATA driver instead of the WD
> driver resulted in an unbootable system because of the following 
> error (approx.):
> 
> mounting root /dev/ad0s1a
> ata-master: lost disk contact
> ata: resetting devices ..
> 
> After this, the machine hangs and doesn't respond to anything but a push
> on the Big Red Button. A few days later, this was fixed by Soren (sp?) but
> it broke again as I recompiled my system yesterday (This was the first
> time after it had been fixed, so I don't know when exactly it broke).
> 
> Harddisks: Western Digital Caviar (2.0 GB), non-DMA and
>            Western Digital Caviar (2.5 GB), DMA-33.
> Mainboard: Asus P5A-B Super7
> Chipset: ALi Aladdin V AGPset
> 
> Taking the UDMA disk out doesn't help. Everything works just
> fine with the WD driver...

Same here, but with a toshiba laptop disk.  I have to comment out a version
test in ata-disk.c to get it to work.

--- ata-disk.c  1999/12/18 20:06:30     1.46
+++ ata-disk.c  1999/12/21 21:48:28
@@ -117,7 +117,7 @@
 static __inline int
 udmamode(struct ata_params *ap)
 {
-    if ((ap->atavalid & 4) && ad_version(ap->versmajor) >= 3) {
+    if ((ap->atavalid & 4) /* && ad_version(ap->versmajor) >= 3 */) {
        if (ap->udmamodes & 0x10) return (ap->cblid ? 4 : 2);
        if (ap->udmamodes & 0x08) return (ap->cblid ? 3 : 2);
        if (ap->udmamodes & 0x04) return 2;

Without this, ata thinks is's an ATA-0 disk and tries to use DMA mode.
However, it hangs with:

mounting root /dev/ad0s1a
ata-master: lost disk contact
ata: resetting devices ..

and never gets to "done" just like you.  If I remove the ATA version test and
just have it look at the "I support UDMA" bit, it runs in UDMA33 mode and
works fine.  I suspect that if it got a CRC error and tried to do a fallback
that it would hang there too, but I have not seen any.

I think the (plain) DMA code is broken somewhere.

Cheers,
-Peter
--
Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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