diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-07-17 22:00:01 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-07-17 22:00:01 +0000 |
commit | 678671e8d75e3f5924467e0851f91f860b7c50df (patch) | |
tree | 3c20d63824c89b4e93154e652bbe1f0b3d49cb8b /sys | |
parent | dea46a95aecc2f88c901f933c4c3370264eb6fe2 (diff) |
make isa_intr_establish() once again not panic
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/i386/isa/isa_machdep.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/sys/arch/i386/isa/isa_machdep.c b/sys/arch/i386/isa/isa_machdep.c index 1466de2073d..23f2b2370a0 100644 --- a/sys/arch/i386/isa/isa_machdep.c +++ b/sys/arch/i386/isa/isa_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isa_machdep.c,v 1.30 1998/06/29 02:12:58 downsj Exp $ */ +/* $OpenBSD: isa_machdep.c,v 1.31 1998/07/17 22:00:00 deraadt Exp $ */ /* $NetBSD: isa_machdep.c,v 1.22 1997/06/12 23:57:32 thorpej Exp $ */ #define ISA_DMA_STATS @@ -491,12 +491,16 @@ isa_intr_establish(ic, irq, type, level, ih_fun, ih_arg, ih_what) /* no point in sleeping unless someone can free memory. */ ih = malloc(sizeof *ih, M_DEVBUF, cold ? M_NOWAIT : M_WAITOK); - if (ih == NULL) - panic("isa_intr_establish: can't malloc handler info"); - - if (!LEGAL_IRQ(irq) || type == IST_NONE) - panic("intr_establish: bogus irq or type"); + if (ih == NULL) { + printf("%s: isa_intr_establish: can't malloc handler info\n", + ih_what); + return NULL; + } + if (!LEGAL_IRQ(irq) || type == IST_NONE) { + printf("%s: intr_establish: bogus irq or type\n", ih_what); + return NULL; + } switch (intrtype[irq]) { case IST_NONE: intrtype[irq] = type; @@ -506,10 +510,12 @@ isa_intr_establish(ic, irq, type, level, ih_fun, ih_arg, ih_what) if (type == intrtype[irq]) break; case IST_PULSE: - if (type != IST_NONE) - panic("intr_establish: can't share %s with %s, irq %d", - isa_intr_typename(intrtype[irq]), - isa_intr_typename(type), irq); + if (type != IST_NONE) { + /*printf("%s: intr_establish: can't share %s with %s, irq %d\n", + ih_what, isa_intr_typename(intrtype[irq]), + isa_intr_typename(type), irq);*/ + return NULL; + } break; } |