Allow boot arguments to override the host id on a per instance basis.

This commit is contained in:
mark 1998-09-18 03:23:19 +00:00
parent 0ad4a32dfb
commit 9f474557fe
2 changed files with 8 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: csa.c,v 1.1 1998/03/14 17:04:30 mark Exp $ */
/* $NetBSD: csa.c,v 1.2 1998/09/18 03:23:19 mark Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -149,6 +149,7 @@ csa_attach(parent, self, aux)
struct csa_softc *sc = (struct csa_softc *)self;
struct podule_attach_args *pa = aux;
u_char *iobase;
char hi_option[sizeof(sc->sc_ncr5380.sc_dev.dv_xname) + 8];
/* Note the podule number and validate */
@ -198,7 +199,8 @@ csa_attach(parent, self, aux)
sc->sc_ncr5380.sc_link.device = &csa_scsidev;
/* Provide an override for the host id */
(void)get_bootconf_option(boot_args, "csa.hostid",
sprintf(hi_option, "%s.hostid", sc->sc_ncr5380.sc_dev.dv_xname);
(void)get_bootconf_option(boot_args, hi_option,
BOOTOPT_TYPE_INT, &sc->sc_ncr5380.sc_link.scsipi_scsi.adapter_target);
printf(" host=%d, using 8 bit PIO", sc->sc_ncr5380.sc_link.scsipi_scsi.adapter_target);

View File

@ -1,4 +1,4 @@
/* $NetBSD: oak.c,v 1.13 1998/03/14 17:06:17 mark Exp $ */
/* $NetBSD: oak.c,v 1.14 1998/09/18 03:23:19 mark Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -126,6 +126,7 @@ oak_attach(parent, self, aux)
struct oak_softc *sc = (struct oak_softc *)self;
struct podule_attach_args *pa = aux;
u_char *iobase;
char hi_option[sizeof(sc->sc_ncr5380.sc_dev.dv_xname) + 8];
/* Note the podule number and validate */
@ -171,7 +172,8 @@ oak_attach(parent, self, aux)
sc->sc_ncr5380.sc_link.device = &oak_scsidev;
/* Provide an override for the host id */
(void)get_bootconf_option(boot_args, "oak.hostid",
sprintf(hi_option, "%s.hostid", sc->sc_ncr5380.sc_dev.dv_xname);
(void)get_bootconf_option(boot_args, hi_option,
BOOTOPT_TYPE_INT, &sc->sc_ncr5380.sc_link.scsipi_scsi.adapter_target);
printf(" host=%d, using 8 bit PIO\n",