From owner-freebsd-bugs Wed Jan 29 11:14:22 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 F218837B401 for ; Wed, 29 Jan 2003 11:14:20 -0800 (PST) Received: from HAL9000.homeunix.com (12-233-57-224.client.attbi.com [12.233.57.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C1E443FA7 for ; Wed, 29 Jan 2003 11:14:19 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.6/8.12.5) with ESMTP id h0TJEHNt005431; Wed, 29 Jan 2003 11:14:17 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.6/8.12.5/Submit) id h0TJEH1S005430; Wed, 29 Jan 2003 11:14:17 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Date: Wed, 29 Jan 2003 11:14:17 -0800 From: David Schultz To: jjramsey@pobox.com Cc: freebsd-bugs@FreeBSD.ORG Subject: Re: Revisiting the semirandom bug/issue in FreeBSD's ATA querying Message-ID: <20030129191417.GA5337@HAL9000.homeunix.com> Mail-Followup-To: jjramsey@pobox.com, freebsd-bugs@FreeBSD.ORG References: <20030129183150.GB3139@HAL9000.homeunix.com> <20030129184945.38654.qmail@web10706.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030129184945.38654.qmail@web10706.mail.yahoo.com> 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 Thus spake James J. Ramsey : > --- David Schultz > wrote: > > No delay is supposed to be > > required between > > probing the slave and probing the master, other than > > waiting for > > the command to complete, but the Linux driver has > > one anyway. > > I guess the next question is whether FreeBSD has a > delay between probing of master and slave as Linux > does. No, it doesn't, although the kernel image I sent you a link to earlier does. 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. 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)); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message