Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Jan 2003 11:14:17 -0800
From:      David Schultz <dschultz@uclink.Berkeley.EDU>
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>
In-Reply-To: <20030129184945.38654.qmail@web10706.mail.yahoo.com>
References:  <20030129183150.GB3139@HAL9000.homeunix.com> <20030129184945.38654.qmail@web10706.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Thus spake James J. Ramsey <jjramsey_6x9eq42@yahoo.com>:
> --- David Schultz <dschultz@uclink.Berkeley.EDU>
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030129191417.GA5337>