Subject: Re: attempted netbsd installs (success)
To: Ben Collver <collver1@comcast.net>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: port-sparc64
Date: 11/23/2003 22:26:37
On Sun, Nov 23, 2003 at 09:55:36AM -0800, Ben Collver wrote:
> On Sun, Nov 23, 2003 at 02:34:19PM +0100, Manuel Bouyer wrote:
> > As with debug it attaches, it's a timing problem. Could you try to enable each
> > printf individually to see which one cause the drive to attach ?
> 
> Hi Manuel,
> 
> Thank you for all the help.  I finally solved this issue.  It's a little
> emberassing so I'll explain the story.
> 
> I had installed NetBSD on a Pentium-based PC that was given to me, and used
> it to test COMPAT_IBCS2.  It worked fine, and I didn't even open the case.
> I opened the case recently to pull out the hard drive to use in the sparc.
> The hard drive was standalone on an IDE cable, so I *assumed* it was OK.
> 
> This morning I read the manual on Western Digital's web site and
> double-checked the jumpers.  The jumpers were misconfigured to be the
> Master on a Dual setup.  I set the jumpers to Single (Standard
> Installation) and the drive attaches when NetBSD-current/sparc64 is booted
> from cdrom without debugging messages.  I apologize for not checking this
> sooner.
> 
> For penance I tracked down the debugging message that provides enough delay
> for the misconfigured drive to attach.  I commented out all the debugging
> messages except for the following in sys/dev/pci/pciide_common.c:
> 
> #ifdef WDCDEBUG
>         if (wdcdebug_pciide_mask & DEBUG_PROBE)
> 		pci_conf_print(sc->sc_pc, sc->sc_tag, NULL);
> #endif
> 
> I am willing to run more tests if that is helpful to you.

Well, I don't understand why it does make a difference. This is before
we attach the IDE channel, we don't do anything to the channel or drive at this
point. Even the reset happens much later. My guess is that this just delays
the reset of the drive a bit, and is enouth for it. The way it was jumpered,
it was probably waiting for the nonexistent slave, and as the timeout is 31s,
it was reset while still being in reset state. I don't think adding a delay()
here is a good idea, because it may need to be quite long (maybe one or 2
seconds, pci_conf_print() is slow on sparc64).

>Otherwise I am
> satisfied to correctly jumper this drive and move on.
> 
> By the way, I know it is a cheap model, but I plan to use a
> non-OFW-bootable AHA-2940 and SCSI drive as the root filesystem, and the
> IDE drive will just be for booting.  Pretty soon now I should be getting a

If you can find a 53c875-based SCSI adapter, you should be able to boot from
it. I know the tekram390UW works, for example.

> hand-me-down Promise SATA/150 and 10k 36G drive, and plan to see how well
> that works in the sparc.

I think the SATA part of this adapter isn't supported yet.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 24 ans d'experience feront toujours la difference
--