Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/pmax/pmax Introduce MI SCSI codes; for DECstation 5...
details: https://anonhg.NetBSD.org/src/rev/a898e9c92ed7
branches: trunk
changeset: 482687:a898e9c92ed7
user: nisimura <nisimura%NetBSD.org@localhost>
date: Sat Feb 19 09:43:40 2000 +0000
description:
Introduce MI SCSI codes; for DECstation 5000s only this moment and
disabled by default.
diffstat:
sys/arch/pmax/pmax/autoconf.c | 48 ++++++-
sys/arch/pmax/pmax/conf.c | 309 ++++++++++++++++++++---------------------
sys/arch/pmax/pmax/disksubr.c | 16 +--
3 files changed, 197 insertions(+), 176 deletions(-)
diffs (truncated from 527 to 300 lines):
diff -r a032da54a653 -r a898e9c92ed7 sys/arch/pmax/pmax/autoconf.c
--- a/sys/arch/pmax/pmax/autoconf.c Sat Feb 19 09:23:44 2000 +0000
+++ b/sys/arch/pmax/pmax/autoconf.c Sat Feb 19 09:43:40 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.47 2000/02/19 04:16:18 nisimura Exp $ */
+/* $NetBSD: autoconf.c,v 1.48 2000/02/19 09:43:40 nisimura Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.47 2000/02/19 04:16:18 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.48 2000/02/19 09:43:40 nisimura Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -57,6 +57,14 @@
#include <pmax/dev/device.h>
+#include "rz.h"
+#include "xasc_ioasic.h"
+#include "xasc_pmaz.h"
+
+#if NRZ > 0 && (NXASC_PMAZ + NXASC_IOASIC) > 0
+#error MI SCSI can not coexist with pmax old SCSI.
+#endif
+
struct intrhand intrtab[MAX_INTR_COOKIES];
struct device *booted_device;
int booted_slot, booted_unit, booted_partition;
@@ -78,9 +86,10 @@
/* Configuration is finished, turn on interrupts. */
_splnone(); /* enable all source forcing SOFT_INTs cleared */
-
+#if NRZ > 0
printf("Beginning old-style SCSI device autoconfiguration\n");
configure_scsi();
+#endif
}
/*
@@ -124,6 +133,7 @@
void
cpu_rootconf()
{
+#if NRZ > 0
struct device *dv;
char name[4];
@@ -138,8 +148,40 @@
break;
}
}
+#endif
printf("boot device: %s\n",
booted_device ? booted_device->dv_xname : "<unknown>");
setroot(booted_device, booted_partition);
}
+
+#if (NXASC_PMAZ + NXASC_IOASIC) > 0
+
+#include <dev/scsipi/scsipi_all.h>
+#include <dev/scsipi/scsiconf.h>
+#include <sys/disk.h>
+
+struct xx_softc {
+ struct device sc_dev;
+ struct disk sc_dk;
+ int flag;
+ struct scsipi_link *sc_link;
+};
+#define SCSITARGETID(dev) ((struct xx_softc *)dev)->sc_link->scsipi_scsi.target
+
+int slot_in_progress; /* XXX - TC slot being probed, ugly backdoor interface */
+
+void
+dk_establish(dk, dev)
+ struct disk *dk;
+ struct device *dev;
+{
+ if (booted_device || strcmp(booted_protocol, "SCSI"))
+ return;
+ if (booted_slot != slot_in_progress)
+ return;
+ if (booted_unit != SCSITARGETID(dev))
+ return;
+ booted_device = dev;
+}
+#endif
diff -r a032da54a653 -r a898e9c92ed7 sys/arch/pmax/pmax/conf.c
--- a/sys/arch/pmax/pmax/conf.c Sat Feb 19 09:23:44 2000 +0000
+++ b/sys/arch/pmax/pmax/conf.c Sat Feb 19 09:43:40 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: conf.c,v 1.37 2000/01/10 03:24:36 simonb Exp $ */
+/* $NetBSD: conf.c,v 1.38 2000/02/19 09:43:40 nisimura Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -43,56 +43,56 @@
#include <sys/tty.h>
#include <sys/conf.h>
-
-bdev_decl(sw);
-#include "rz.h"
-bdev_decl(rz);
-#include "tz.h"
-bdev_decl(tz);
+#include "ccd.h"
+#include "cd.h"
+#include "md.h"
+#include "raid.h"
#include "sd.h"
+#include "st.h"
+#include "vnd.h"
+bdev_decl(ccd);
+bdev_decl(cd);
+bdev_decl(md);
+bdev_decl(raid);
bdev_decl(sd);
-#include "st.h"
bdev_decl(st);
-#include "cd.h"
-bdev_decl(cd);
-#include "ccd.h"
-bdev_decl(ccd);
-#include "raid.h"
-bdev_decl(raid);
-#include "vnd.h"
+bdev_decl(sw);
bdev_decl(vnd);
-#include "md.h"
-bdev_decl(md);
+
+#include "rz.h"
+#include "tz.h"
+bdev_decl(rz);
+bdev_decl(tz);
struct bdevsw bdevsw[] =
{
- bdev_notdef(), /* 0: SCSI disk */
- bdev_notdef(), /* 1: vax ht */
+ bdev_notdef(), /* 0: nodev */
+ bdev_notdef(), /* 1: ULTRIX vax ht */
bdev_disk_init(NVND,vnd), /* 2: vnode disk driver */
- bdev_notdef(), /* 3: vax rk*/
+ bdev_notdef(), /* 3: ULTRIX vax rk */
bdev_swap_init(1,sw), /* 4: swap pseudo-device*/
- bdev_notdef(), /* 5: vax tm */
- bdev_notdef(), /* 6: vax ts */
- bdev_notdef(), /* 7: vax mt */
- bdev_notdef(), /* 8: vax tu */
- bdev_notdef(), /* 9: ?? */
- bdev_notdef(), /* 10: ut */
- bdev_notdef(), /* 11: 11/730 idc */
- bdev_notdef(), /* 12: rx */
- bdev_notdef(), /* 13: uu */
- bdev_notdef(), /* 14: rl */
- bdev_notdef(), /* 15: tmscp */
- bdev_notdef(), /* 16: cs */
+ bdev_notdef(), /* 5: ULTRIX vax tm */
+ bdev_notdef(), /* 6: ULTRIX vax ts */
+ bdev_notdef(), /* 7: ULTRIX vax mt */
+ bdev_notdef(), /* 8: ULTRIX vax tu */
+ bdev_notdef(), /* 9: nodev */
+ bdev_notdef(), /* 10: ULTRIX ut */
+ bdev_notdef(), /* 11: ULTRIX 11/730 idc */
+ bdev_notdef(), /* 12: ULTRIX rx */
+ bdev_notdef(), /* 13: ULTRIX uu */
+ bdev_notdef(), /* 14: ULTRIX rl */
+ bdev_notdef(), /* 15: ULTRIX tmscp */
+ bdev_notdef(), /* 16: ULTRIX cs */
bdev_disk_init(NMD,md), /* 17: memory disk driver */
- bdev_tape_init(NST,st), /* 18: st */
- bdev_disk_init(NSD,sd), /* 19: sd */
- bdev_tape_init(NTZ, tz), /* 20: tz */
- bdev_disk_init(NRZ,rz), /* 21: ?? SCSI disk */ /*XXX*/
- bdev_disk_init(NRZ,rz), /* 22: ?? old SCSI disk */ /*XXX*/
- bdev_notdef(), /* 23: mscp */
+ bdev_tape_init(NST,st), /* 18: MI SCSI tape */
+ bdev_disk_init(NSD,sd), /* 19: MI SCSI disk */
+ bdev_tape_init(NTZ, tz), /* 20: ULTRIX tz tape */
+ bdev_disk_init(NRZ,rz), /* 21: ULTRIX rz disk & CD-ROM */
+ bdev_notdef(), /* 22: nodev */
+ bdev_notdef(), /* 23: ULTRIX mscp */
bdev_disk_init(NCCD,ccd), /* 24: concatenated disk driver */
- bdev_disk_init(NCD,cd), /* 25: SCSI CD-ROM */
+ bdev_disk_init(NCD,cd), /* 25: MI SCSI CD-ROM */
bdev_lkm_dummy(), /* 26 */
bdev_lkm_dummy(), /* 27 */
@@ -132,52 +132,45 @@
#define ptcioctl ptyioctl
cdev_decl(ptc);
cdev_decl(log);
+#include "bpfilter.h"
+#include "ch.h"
+#include "ipfilter.h"
+#include "rnd.h"
+#include "ss.h"
+#include "tun.h"
+#include "uk.h"
+#include "scsibus.h"
+cdev_decl(bpf);
+cdev_decl(ccd);
+cdev_decl(cd);
+cdev_decl(ch);
cdev_decl(fd);
-cdev_decl(sd);
-cdev_decl(st);
+dev_decl(filedesc,open);
cdev_decl(md);
-#include "ss.h"
+cdev_decl(raid);
+cdev_decl(scsibus);
+cdev_decl(sd);
cdev_decl(ss);
-#include "uk.h"
+cdev_decl(st);
+cdev_decl(tun);
cdev_decl(uk);
cdev_decl(vnd);
-cdev_decl(cd);
-cdev_decl(ccd);
-cdev_decl(raid);
-#include "bpfilter.h"
-cdev_decl(bpf);
-#include "dtop.h"
-cdev_decl(dtop);
+cdev_decl(vnd);
+
#include "dc.h"
-cdev_decl(dc);
+#include "dtop.h"
+#include "fb.h"
+#include "px.h"
+#include "rasterconsole.h"
#include "scc.h"
-cdev_decl(scc);
-cdev_decl(rz);
-cdev_decl(tz);
-#include "rasterconsole.h"
-cdev_decl(rcons);
-#include "fb.h"
+cdev_decl(dc);
+cdev_decl(dtop);
cdev_decl(fb);
-#include "pm.h"
-cdev_decl(pm);
-#include "cfb.h"
-cdev_decl(cfb);
-#include "xcfb.h"
-cdev_decl(xcfb);
-#include "mfb.h"
-cdev_decl(mfb);
-#include "px.h"
cdev_decl(px);
-dev_decl(filedesc,open);
-#include "tun.h"
-cdev_decl(tun);
-cdev_decl(vnd);
-#include "ipfilter.h"
-#include "rnd.h"
-
-#include "scsibus.h"
-cdev_decl(scsibus);
-
+cdev_decl(rcons);
+cdev_decl(rz);
+cdev_decl(scc);
+cdev_decl(tz);
/* a framebuffer with an attached mouse: */
/* open, close, ioctl, poll, mmap */
@@ -195,89 +188,89 @@
cdev_swap_init(1,sw), /* 1: /dev/drum (swap pseudo-device) */
cdev_ctty_init(1,ctty), /* 2: controlling terminal */
cdev_mm_init(1,mm), /* 3: /dev/{null,mem,kmem,...} */
- cdev_tty_init(NPTY,pts), /* 4: pseudo-tty slave */
- cdev_ptc_init(NPTY,ptc), /* 5: pseudo-tty master */
+ cdev_tty_init(NPTY,pts), /* 4: pseudo-tty slave */
+ cdev_ptc_init(NPTY,ptc), /* 5: pseudo-tty master */
cdev_log_init(1,log), /* 6: /dev/klog */
cdev_fd_init(1,filedesc), /* 7: file descriptor pseudo-dev */
- cdev_notdef(), /* 8: old 2100/3100 frame buffer */
- cdev_disk_init(NSD,sd), /* 9: old slot for SCSI disk */
- cdev_tape_init(NTZ,tz), /* 10: SCSI tape */
+ cdev_notdef(), /* 8: ULTRIX fl */
+ cdev_disk_init(NSD,sd), /* 9: MI SCSI disk */
+ cdev_tape_init(NTZ,tz), /* 10: ULTRIX tz tape */
cdev_disk_init(NVND,vnd), /* 11: vnode disk driver */
cdev_bpftun_init(NBPFILTER,bpf),/* 12: Berkeley packet filter */
- cdev_notdef(), /* 13: color frame buffer */
Home |
Main Index |
Thread Index |
Old Index