Subject: Re: 120GB HD
To: Sergio Jimenez <tripledes@eslack.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: port-i386
Date: 11/13/2003 23:36:20
--St7VIuEGZ6dlpu13
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Mon, Nov 10, 2003 at 03:12:48AM +0000, Sergio Jimenez wrote:
> On Sun, 9 Nov 2003 19:31:07 +0100
> Manuel Bouyer <bouyer@antioche.eu.org> wrote:
>
> > On Tue, Nov 04, 2003 at 10:46:14PM +0000, Sergio Jimenez wrote:
> > > Don't worry, here you are the dmesg, and the disk is on secondary port of the cmdide as a master.
> >
> > OK, thanks.
> > Looks like the drive fails to become ready after reset; maybe we don't
> > wait long enouth.
> > Can you try the attached patch ?
> > If it doesn't help, maybe try to increase the delay again.
> >
> > --
> > Manuel Bouyer <bouyer@antioche.eu.org>
> > NetBSD: 23 ans d'experience feront toujours la difference
> > --
> >
>
> I've increased the delay to "11000, 15000, 20000 and 40000" (like you can see in the patch) and nothing happens. In addition, I've changed the disk from cmdide to viaide (channel 1 drive 0), nothing.
Hum, so it looks like this drive will never assert DRDY by itself.
> I've attached the patch and dmesg.boot with "wdcdebug_mask" to "0x10". For more info I've just booted an OpenBSD-3.4-current and the disk is detected without problems. Sorry I don't know how I could help. :\
It can.
It seems openbsd issue a dummy command before waiting for DRDY.
Can you try the attached patch ?
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 24 ans d'experience feront toujours la difference
--
--St7VIuEGZ6dlpu13
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff
Index: wdc.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/wdc.c,v
retrieving revision 1.154
diff -u -r1.154 wdc.c
--- wdc.c 13 Nov 2003 22:18:10 -0000 1.154
+++ wdc.c 13 Nov 2003 22:33:24 -0000
@@ -334,6 +334,10 @@
/* If no drives, abort attach here. */
goto out;
+ bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh, WDSD_IBM);
+ delay(1); /* 400ns delay */
+ bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_command,
+ WDCC_RECAL);
/* for ATA/OLD drives, wait for DRDY, 3s timeout */
for (i = 0; i < mstohz(3000); i++) {
if (chp->wdc && (chp->wdc->cap & WDC_CAPABILITY_SELECT))
--St7VIuEGZ6dlpu13--