Subject: port-sparc/1414: bootpath glue didn't make it into si.c
To: None <gnats-bugs@gnats.netbsd.org>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: netbsd-bugs
Date: 08/27/1995 12:59:53
>Number:         1414
>Category:       port-sparc
>Synopsis:       bootpath glue didn't make it into si.c
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 27 16:05:03 1995
>Last-Modified:
>Originator:     Jason Thorpe
>Organization:
Numerical Aerodynamic Simulation Project - NASA Ames
>Release:        -current, Aug 22, 1995
>Environment:
	

My 4/260 at home ... Sorry, I just re-installed after a disk failure,
so I can't send-pr from it yet :-)

>Description:
	The new bootpath stuff never made it into si.c.  Consequently,
	if you boot from a SCSI disk attached to an si board, you
	get a `panic: boot device not known' even though the bootpath
	is correctly set to `/vmes@0,0/si0/sd@0,0'.

>How-To-Repeat:
	
	> b sd()netbsd -s
>Fix:
Index: si.c
===================================================================
RCS file: /mastersrc/netbsd/src/sys/arch/sparc/dev/si.c,v
retrieving revision 1.1.1.3
retrieving revision 1.5
diff -c -r1.1.1.3 -r1.5
*** si.c	1995/08/20 04:24:13	1.1.1.3
--- si.c	1995/08/27 20:00:36	1.5
***************
*** 151,156 ****
--- 151,157 ----
  	volatile sci_regmap_t *regs;
  	struct confargs *ca = aux;
  	struct romaux *ra = &ca->ca_ra;
+ 	struct bootpath *bp;
  
  	switch (ca->ca_bustype) {
  	case BUS_VME16:
***************
*** 188,194 ****
--- 189,216 ----
  	printf(" pri %d\n", ra->ra_intr[0].int_pri);
  	reset_adapter(ncr5380);
  	ncr5380_reset_scsibus(ncr5380);
+ 
+ 	/*
+ 	 * If the boot path is "si" at the moment and it's me, then
+ 	 * walk out pointer to the sub-device, ready for the config
+ 	 * below.
+ 	 */
+ 	bp = ca->ca_ra.ra_bp;
+ 	switch (ca->ca_bustype) {
+ 	case BUS_VME16:
+ 		if (bp != NULL && strcmp(bp->name, "si") == 0 &&
+ 		    bp->val[0] == -1 && bp->val[1] == ncr5380->sc_dev.dv_unit)
+ 			bootpath_store(1, bp + 1);
+ 		break;
+ 
+ 	default:
+ 		panic("si_attach: this can't happen");
+ 	}
+ 
+ 	/* Configure sub-devices */
  	config_found(self, &(ncr5380->sc_link), si_print);
+ 
+ 	bootpath_store(1, NULL);
  }
  
  static void
>Audit-Trail:
>Unformatted: