Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/pmax/dev + Call prom_scsiid() to found out what the...



details:   https://anonhg.NetBSD.org/src/rev/8b642c17813e
branches:  trunk
changeset: 473590:8b642c17813e
user:      simonb <simonb%NetBSD.org@localhost>
date:      Tue Jun 08 23:41:59 1999 +0000

description:
+ Call prom_scsiid() to found out what the host SCSI ID should
   be instead of hardcoding values.
 + Print the host SCSI ID in siiattach().

XXX - probably should do the same to the ASC driver??  The manuals for
the 5000 series machines don't mention the scsiidN env variable, but it
is present on all the models I've looked at...

diffstat:

 sys/arch/pmax/dev/sii.c |  11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diffs (40 lines):

diff -r 98574ca64886 -r 8b642c17813e sys/arch/pmax/dev/sii.c
--- a/sys/arch/pmax/dev/sii.c   Tue Jun 08 23:40:42 1999 +0000
+++ b/sys/arch/pmax/dev/sii.c   Tue Jun 08 23:41:59 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sii.c,v 1.35 1999/04/24 08:01:08 simonb Exp $  */
+/*     $NetBSD: sii.c,v 1.36 1999/06/08 23:41:59 simonb Exp $  */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -71,6 +71,7 @@
 #include <pmax/dev/siivar.h>           /* softc and prototypes */
 
 #include <pmax/pmax/pmaxtype.h>                /* Definition of DS_PMAX */
+#include <pmax/pmax/machdep.h>         /* prom_scsiid prototype */
 
 /* Machine-indepedent back-end attach entry point */
 void   siiattach __P((struct siisoftc *sc));
@@ -219,6 +220,7 @@
 #ifdef USE_NEW_SCSI
        /* XXX probe SCSI bus and attach slave devices */
 #endif
+       printf(": target %d", sc->sc_regs->id & SII_IDMSK);
 }
 
 
@@ -302,12 +304,9 @@
         */
        regs->csr = SII_HPM;
        /*
-        * Set host adapter ID (6 for PMIN/PMAX, 7 for everything else)
+        * Set host adapter ID (from PROM sciiidN variable).
         */
-       if (systype == DS_PMAX)
-               regs->id = SII_ID_IO | 6;
-       else
-               regs->id = SII_ID_IO | 7;
+       regs->id = SII_ID_IO | prom_scsiid(sc->sc_dev.dv_unit);
        /*
         * Enable SII to drive the SCSI bus.
         */



Home | Main Index | Thread Index | Old Index