diff options
author | Mats O Jansson <maja@cvs.openbsd.org> | 1997-09-10 12:08:38 +0000 |
---|---|---|
committer | Mats O Jansson <maja@cvs.openbsd.org> | 1997-09-10 12:08:38 +0000 |
commit | 5b8c56d2d4d1cbe470de1821d8dbf0a09be7cfa4 (patch) | |
tree | c4fabae6d813ad8f61e4144364980154cc9c452a /sys | |
parent | 527830974744f2a3c3c81d19d69b2036823ea766 (diff) |
Sync with NetBSD 970516. -moj
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/vax/vsa/hdc9224.c | 19 | ||||
-rw-r--r-- | sys/arch/vax/vsa/ncr.c | 14 | ||||
-rw-r--r-- | sys/arch/vax/vsa/vsbus.c | 31 |
3 files changed, 47 insertions, 17 deletions
diff --git a/sys/arch/vax/vsa/hdc9224.c b/sys/arch/vax/vsa/hdc9224.c index 17b27fd2c3e..e97f9f25850 100644 --- a/sys/arch/vax/vsa/hdc9224.c +++ b/sys/arch/vax/vsa/hdc9224.c @@ -1,5 +1,5 @@ -/* $OpenBSD: hdc9224.c,v 1.2 1997/05/29 00:05:32 niklas Exp $ */ -/* $NetBSD: hdc9224.c,v 1.4 1996/10/13 03:36:11 christos Exp $ */ +/* $OpenBSD: hdc9224.c,v 1.3 1997/09/10 12:08:36 maja Exp $ */ +/* $NetBSD: hdc9224.c,v 1.6 1997/03/15 16:32:22 ragge Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -71,6 +71,7 @@ static int keepLock = 0; #include <sys/disklabel.h> #include <sys/disk.h> #include <sys/syslog.h> +#include <sys/reboot.h> #include <machine/pte.h> #include <machine/sid.h> @@ -78,6 +79,7 @@ static int keepLock = 0; #include <machine/uvax.h> #include <machine/ka410.h> #include <machine/vsbus.h> +#include <machine/rpb.h> #include <vax/vsa/hdc9224.h> @@ -392,6 +394,11 @@ rdattach(parent, self, aux) rp->diskname, rp->diskblks/2048, rp->disklbns, rp->cylinders, rp->heads, rp->sectors); } + /* + * Know where we booted from. + */ + if ((B_TYPE(bootdev) == BDEV_RD) && (rd->sc_drive == B_UNIT(bootdev))) + booted_from = self; } /* @@ -422,10 +429,9 @@ rdstrategy(bp) */ /*------------------------------*/ blkno = bp->b_blkno / (rd->sc_dk.dk_label->d_secsize / DEV_BSIZE); - if (HDCPART(bp->b_dev) != RAW_PART) { - p = &rd->sc_dk.dk_label->d_partitions[HDCPART(bp->b_dev)]; - blkno += p->p_offset; - } + p = &rd->sc_dk.dk_label->d_partitions[HDCPART(bp->b_dev)]; + blkno += p->p_offset; + /* nblks = howmany(bp->b_bcount, sd->sc_dk.dk_label->d_secsize); */ if (hdc_strategy(hdc, rd, HDCUNIT(bp->b_dev), @@ -1141,5 +1147,4 @@ hdc_select(sc, unit) return (error); } - #endif /* NHDC > 0 */ diff --git a/sys/arch/vax/vsa/ncr.c b/sys/arch/vax/vsa/ncr.c index f283ea8e680..59fcde3bc49 100644 --- a/sys/arch/vax/vsa/ncr.c +++ b/sys/arch/vax/vsa/ncr.c @@ -1,5 +1,5 @@ -/* $OpenBSD: ncr.c,v 1.2 1997/05/28 23:35:51 niklas Exp $ */ -/* $NetBSD: ncr.c,v 1.5 1996/10/13 03:36:14 christos Exp $ */ +/* $OpenBSD: ncr.c,v 1.3 1997/09/10 12:08:37 maja Exp $ */ +/* $NetBSD: ncr.c,v 1.8 1997/02/26 22:29:12 gwr Exp $ */ /* #define DEBUG /* */ /* #define TRACE /* */ @@ -425,8 +425,10 @@ si_attach(parent, self, aux) ncr_sc->sc_dma_stop = si_dma_stop; ncr_sc->sc_flags = 0; - if (si_options & SI_DO_RESELECT) - ncr_sc->sc_flags |= NCR5380_PERMIT_RESELECT; +#ifndef __OpenBSD__ + if ((si_options & SI_DO_RESELECT) == 0) + ncr_sc->sc_no_disconnect = 0xff; +#endif if ((si_options & SI_DMA_INTR) == 0) ncr_sc->sc_flags |= NCR5380_FORCE_POLLING; ncr_sc->sc_min_dma_len = MIN_DMA_LEN; @@ -474,7 +476,9 @@ si_minphys(struct buf *bp) #ifdef DEBUG if (si_debug) { printf("si_minphys len = 0x%x.\n", bp->b_bcount); +#ifdef DDB Debugger(); +#endif } #endif bp->b_bcount = MAX_DMA_LEN; @@ -651,8 +655,10 @@ si_dma_alloc(ncr_sc) * XXX - Should just segment these... */ if (xlen > MAX_DMA_LEN) { +#ifdef DEBUG printf("si_dma_alloc: excessive xlen=0x%x\n", xlen); Debugger(); +#endif ncr_sc->sc_datalen = xlen = MAX_DMA_LEN; } diff --git a/sys/arch/vax/vsa/vsbus.c b/sys/arch/vax/vsa/vsbus.c index 2c3d8766f17..0137c290cae 100644 --- a/sys/arch/vax/vsa/vsbus.c +++ b/sys/arch/vax/vsa/vsbus.c @@ -1,5 +1,5 @@ -/* $OpenBSD: vsbus.c,v 1.2 1997/05/29 00:05:36 niklas Exp $ */ -/* $NetBSD: vsbus.c,v 1.4 1996/10/13 03:36:17 christos Exp $ */ +/* $OpenBSD: vsbus.c,v 1.3 1997/09/10 12:08:37 maja Exp $ */ +/* $NetBSD: vsbus.c,v 1.6 1997/03/22 23:05:31 ragge Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -90,7 +90,7 @@ void vsbus_intr_dispatch __P((int i)); struct confargs *vsbus_devs = NULL; -#ifdef VAX410 /* also: KA420 */ +#ifdef VAX410 struct confargs ka410_devs[] = { /* name intslot intpri intvec intbit ioaddr */ { "dc", 7, 7, 0x2C0, (1<<7), KA410_SER_BASE, @@ -114,6 +114,22 @@ struct confargs ka410_devs[] = { #endif { "" }, }; + +/* + * It would be better if we could use the (provided) system config + * information for each CPU instead of this. + */ +struct confargs ka420_devs[] = { + { "le", 5, 5, 0x250, (1<<5), KA410_LAN_BASE, + KA410_NWA_BASE, 0x00, }, + { "ncr", 1, 1, 0x3F8, (1<<1), KA410_SCS_BASE, + KA410_SCS_DADR, KA410_SCS_DCNT, KA410_SCS_DDIR, + KA410_DMA_BASE, KA410_DMA_SIZE, 0x00, 0x07, }, + { "ncr", 0, 0, 0x3FC, (1<<0), 0x200C0180, + 0x200C01A0, 0x200C01C0, 0x200C01C4, + KA410_DMA_BASE, KA410_DMA_SIZE, 0x00, 0x07, }, + { "" }, +}; #endif #ifdef VAX43 @@ -233,18 +249,21 @@ vsbus_attach(parent, self, aux) printf("\n"); trace (("vsbus_attach()\n")); - printf("vsbus_attach: boardtype = %x\n", vax_boardtype); - switch (vax_boardtype) { - case VAX_BTYP_410: case VAX_BTYP_420: + vsbus_devs = ka420_devs; + break; + + case VAX_BTYP_410: vsbus_devs = ka410_devs; break; case VAX_BTYP_43: case VAX_BTYP_46: case VAX_BTYP_49: +#ifdef VAX43 vsbus_devs = ka43_devs; +#endif break; default: |