From owner-freebsd-current Tue Dec 21 13:59:45 1999 Delivered-To: freebsd-current@freebsd.org Received: from freebsd.dk (freebsd.dk [212.242.42.178]) by hub.freebsd.org (Postfix) with ESMTP id BABE815574 for ; Tue, 21 Dec 1999 13:59:40 -0800 (PST) (envelope-from sos@freebsd.dk) Received: (from sos@localhost) by freebsd.dk (8.9.3/8.9.1) id WAA07522; Tue, 21 Dec 1999 22:59:20 +0100 (CET) (envelope-from sos) From: Soren Schmidt Message-Id: <199912212159.WAA07522@freebsd.dk> Subject: Re: Problems with the ATA-driver In-Reply-To: <19991221215114.977C71CCE@overcee.netplex.com.au> from Peter Wemm at "Dec 22, 1999 05:51:14 am" To: peter@netplex.com.au (Peter Wemm) Date: Tue, 21 Dec 1999 22:59:20 +0100 (CET) Cc: havoc@Cal30B054.student.utwente.nl (Theo van Klaveren), freebsd-current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG It seems Peter Wemm wrote: > > 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. I've just a few hours ago committed a change that does this... > > --- 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. Its the same code as is used i UDMA mode :), its only the timing thats different and the setup of the controller. It will never fall back to a lower DMA rate, as lots of chipsets can't do that, it will always fall back to PIO, which should work... -Søren To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message