Subject: Fix for booted root detection on indigo 2 (machines with > 1 SCSI bus)
To: None <port-sgimips@netbsd.org>
From: sgimips NetBSD list <sgimips@mrynet.com>
List: port-sgimips
Date: 04/12/2002 01:27:29
The following patch fixes a problem where booting an indigo 2, and any machine
with more than one SCSI bus, doesn't determine to booted root device:

--- autoconf.c  Fri Apr 12 01:21:41 2002
+++ autoconf.c.new2     Fri Apr 12 01:20:04 2002
@@ -178,7 +178,8 @@
         */
        if (scsiboot && strcmp(cd->cd_name, "wdsc") == 0) {
                /* XXX Check controller number == booted_slot */
-               booted_controller = dev;
+               if (dev->dv_unit == booted_slot)
+                       booted_controller = dev;
                return;
        }

The problem is exhibited at boot time as follows:

boot device: <unknown>
root device:

at which point the operator is being prompted to enter the 
root partition name (usually sd0a).

It looks like, from the XXX comment, that the intention was
to do this at some point.

Some day I'll get around to hacking up a send-pr that'll
work from inside my private IP network :)  Until then, perhaps
some kind soul can regard this and commit it.

-scott