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 be a bit more defensive in the probe routin...
details: https://anonhg.NetBSD.org/src/rev/3ca2102a3c87
branches: trunk
changeset: 485320:3ca2102a3c87
user: matt <matt%NetBSD.org@localhost>
date: Mon Apr 24 21:59:22 2000 +0000
description:
be a bit more defensive in the probe routines. only allow one attachment.
diffstat:
sys/arch/vax/vsa/asc_vsbus.c | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diffs (58 lines):
diff -r 7d32657e87b5 -r 3ca2102a3c87 sys/arch/vax/vsa/asc_vsbus.c
--- a/sys/arch/vax/vsa/asc_vsbus.c Mon Apr 24 21:46:07 2000 +0000
+++ b/sys/arch/vax/vsa/asc_vsbus.c Mon Apr 24 21:59:22 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: asc_vsbus.c,v 1.11 2000/04/23 16:38:54 matt Exp $ */
+/* $NetBSD: asc_vsbus.c,v 1.12 2000/04/24 21:59:22 matt Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: asc_vsbus.c,v 1.11 2000/04/23 16:38:54 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: asc_vsbus.c,v 1.12 2000/04/24 21:59:22 matt Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -142,18 +142,30 @@
NULL,
};
+static u_int8_t asc_attached; /* can't have more than one asc */
+
static int
asc_vsbus_match( struct device *parent, struct cfdata *cf, void *aux)
{
struct vsbus_attach_args *va = aux;
+ volatile u_int8_t *ncr_regs;
int dummy;
- volatile u_int8_t *ncr_regs;
+
+ if (asc_attached)
+ return 0;
if (vax_boardtype != VAX_BTYP_46
&& vax_boardtype != VAX_BTYP_48
&& vax_boardtype != VAX_BTYP_49)
return 0;
+ if (vax_boardtype == VAX_BTYP_49 && cf->cf_loc[0] != 0x26000080)
+ return 0;
+
+ if ((vax_boardtype == VAX_BTYP_46 || vax_boardtype == VAX_BTYP_48)
+ && cf->cf_loc[0] != 0x200c0080)
+ return 0;
+
ncr_regs = (volatile u_int8_t *) va->va_addr;
/* *** need to generate an interrupt here
@@ -187,6 +199,7 @@
struct ncr53c9x_softc *sc = &asc->sc_ncr53c9x;
int error;
+ asc_attached = 1;
/*
* Set up glue for MI code early; we use some of it here.
*/
Home |
Main Index |
Thread Index |
Old Index