Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/vax/vsa Fetch the SCSI ID out of NVRAM instead, if ...



details:   https://anonhg.NetBSD.org/src/rev/fca6e4542e06
branches:  trunk
changeset: 485062:fca6e4542e06
user:      ragge <ragge%NetBSD.org@localhost>
date:      Mon Apr 17 20:36:23 2000 +0000

description:
Fetch the SCSI ID out of NVRAM instead, if possible.

diffstat:

 sys/arch/vax/vsa/asc_vsbus.c |  19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diffs (49 lines):

diff -r b2e8c40a2525 -r fca6e4542e06 sys/arch/vax/vsa/asc_vsbus.c
--- a/sys/arch/vax/vsa/asc_vsbus.c      Mon Apr 17 20:32:00 2000 +0000
+++ b/sys/arch/vax/vsa/asc_vsbus.c      Mon Apr 17 20:36:23 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asc_vsbus.c,v 1.8 2000/04/17 16:30:40 ragge Exp $      */
+/*     $NetBSD: asc_vsbus.c,v 1.9 2000/04/17 20:36:23 ragge Exp $      */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -36,9 +36,11 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "opt_vax46.h"
+
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: asc_vsbus.c,v 1.8 2000/04/17 16:30:40 ragge Exp $");
+__KERNEL_RCSID(0, "$NetBSD: asc_vsbus.c,v 1.9 2000/04/17 20:36:23 ragge Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -69,6 +71,7 @@
 #include <machine/rpb.h>
 #include <machine/scb.h>
 #include <machine/vsbus.h>
+#include <machine/clock.h>     /* for SCSI ctlr ID# XXX */
 
 struct asc_vsbus_softc {
        struct ncr53c9x_softc sc_ncr53c9x;      /* Must be first */
@@ -204,7 +207,17 @@
        error = bus_dmamap_create(asc->sc_dmat, ASC_MAXXFERSIZE, 1, 
            ASC_MAXXFERSIZE, 0, BUS_DMA_NOWAIT, &asc->sc_dmamap);
 
-       sc->sc_id = 6;  /* XXX need to get this from VMB */
+       switch (vax_boardtype) {
+#if defined(VAX46)
+       case VAX_BTYP_46:
+               sc->sc_id = (clk_page[0xbc/2] >> clk_tweak) & 7;
+               break;
+#endif
+       default:
+               sc->sc_id = 6;  /* XXX need to get this from VMB */
+               break;
+       }
+printf("SCSIid: %d ", sc->sc_id);
        sc->sc_freq = ASC_FREQUENCY;
 
        /* gimme Mhz */



Home | Main Index | Thread Index | Old Index