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 - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to