summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-04-16 23:36:28 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-04-16 23:36:28 +0000
commit47c10013eb335a330ccef6bcdfa3b2e49bd3713a (patch)
tree04f358640bcdb292da73cb435755f2a9107d5f69 /sys/arch/mvme88k
parent38731e257ee5ed14c232ec32a3867beafa1e44ca (diff)
Do not attach if we could not get an interrupt.
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r--sys/arch/mvme88k/dev/vx.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/sys/arch/mvme88k/dev/vx.c b/sys/arch/mvme88k/dev/vx.c
index 988316c115f..82bc6b6861b 100644
--- a/sys/arch/mvme88k/dev/vx.c
+++ b/sys/arch/mvme88k/dev/vx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vx.c,v 1.27 2003/12/27 21:58:20 miod Exp $ */
+/* $OpenBSD: vx.c,v 1.28 2004/04/16 23:36:27 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* All rights reserved.
@@ -74,7 +74,6 @@ struct vxsoftc {
struct intrhand sc_ih_s;
int sc_ipl;
int sc_vec;
- int sc_flags;
struct envelope *elist_head, *elist_tail;
struct packet *plist_head, *plist_tail;
};
@@ -168,12 +167,19 @@ vxattach(struct device *parent, struct device *self, void *aux)
struct vxsoftc *sc = (struct vxsoftc *)self;
struct confargs *ca = aux;
+ if (ca->ca_vec < 0) {
+ printf(": no more interrupts!\n");
+ return;
+ }
+ if (ca->ca_ipl < 0)
+ ca->ca_ipl = IPL_TTY;
+
/* set up dual port memory and registers and init */
- sc->vx_reg = (struct vxreg *)ca->ca_vaddr;
- sc->channel = (struct channel *)(ca->ca_vaddr + 0x0100);
+ sc->board_addr = (unsigned int)ca->ca_vaddr;
+ sc->vx_reg = (struct vxreg *)sc->board_addr;
+ sc->channel = (struct channel *)(sc->board_addr + 0x0100);
sc->sc_ipl = ca->ca_ipl;
sc->sc_vec = ca->ca_vec;
- sc->board_addr = (unsigned int)ca->ca_vaddr;
printf("\n");