From owner-freebsd-bugs Wed Jan 29 11:45:50 2003 Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA63737B401 for ; Wed, 29 Jan 2003 11:45:48 -0800 (PST) Received: from web10704.mail.yahoo.com (web10704.mail.yahoo.com [216.136.130.212]) by mx1.FreeBSD.org (Postfix) with SMTP id 5AF5443F93 for ; Wed, 29 Jan 2003 11:45:48 -0800 (PST) (envelope-from jjramsey_6x9eq42@yahoo.com) Message-ID: <20030129194547.20312.qmail@web10704.mail.yahoo.com> Received: from [66.219.135.59] by web10704.mail.yahoo.com via HTTP; Wed, 29 Jan 2003 11:45:47 PST Date: Wed, 29 Jan 2003 11:45:47 -0800 (PST) From: "James J. Ramsey" Reply-To: jjramsey@pobox.com Subject: Re: Revisiting the semirandom bug/issue in FreeBSD's ATA querying To: freebsd-bugs@freebsd.org In-Reply-To: <20030129191417.GA5337@HAL9000.homeunix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --- David Schultz wrote: > Alternatively, you can add one > yourself. The patch > below won't apply cleanly on -CURRENT, but it's easy > enough to add > the lines manually. What will it apply cleanly against? I'd rather apply it against FreeBSD 4.7 if I can, since from what I've read, 5.0 is still rather raw, and the problem seems common to both 4.x and 5.x anyway. BTW, thanks. I'll see about applying it when I get the chance, and let you know if it worked. > Index: ata-all.c > =================================================================== > RCS file: /home/ncvs/src/sys/dev/ata/ata-all.c,v > retrieving revision 1.50.2.42 > diff -p -u -r1.50.2.42 ata-all.c > --- src/sys/dev/ata/ata-all.c 2002/11/01 22:04:06 > 1.50.2.42 > +++ src/sys/dev/ata/ata-all.c 2003/01/29 19:12:43 > @@ -501,6 +501,7 @@ ata_getparam(struct ata_device > *atadev, > > /* apparently some devices needs this repeated > */ > do { > + DELAY(50000); > if (ata_command(atadev, command, 0, 0, 0, > ATA_IMMEDIATE)) { > ata_prtdev(atadev, "%s identify failed\n", > command == ATA_C_ATAPI_IDENTIFY ? "ATAPI" > : "ATA"); > @@ -515,6 +516,7 @@ ata_getparam(struct ata_device > *atadev, > } > } while (ata_wait(atadev, ((command == > ATA_C_ATAPI_IDENTIFY) ? > ATA_S_DRQ : > (ATA_S_READY|ATA_S_DSC|ATA_S_DRQ)))); > + DELAY(50000); > ATA_INSW(atadev->channel->r_io, ATA_DATA, > (int16_t *)ata_parm, > sizeof(struct ata_params)/sizeof(int16_t)); > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message