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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message