From abfee1fdbd0a7f1653b780e7f8148188509bf1f6 Mon Sep 17 00:00:00 2001 From: deraadt Date: Thu, 2 May 1996 13:50:44 +0000 Subject: [PATCH] more verbose interrupt handling? --- sys/dev/eisa/aha1742.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/sys/dev/eisa/aha1742.c b/sys/dev/eisa/aha1742.c index 5de340e49a6..bff9b4fcd33 100644 --- a/sys/dev/eisa/aha1742.c +++ b/sys/dev/eisa/aha1742.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aha1742.c,v 1.6 1996/04/28 04:17:27 tholo Exp $ */ +/* $OpenBSD: aha1742.c,v 1.7 1996/05/02 13:50:44 deraadt Exp $ */ /* $NetBSD: aha1742.c,v 1.59 1996/04/09 22:47:00 cgd Exp $ */ /* @@ -505,13 +505,27 @@ ahbattach(parent, self, aux) model = EISA_PRODUCT_ADP0400; else model = "unknown model!"; - printf(" irq %d: %s\n", ahb->sc_irq, model); + printf(": %s\n", model); -#ifdef NEWCONFIG - isa_establish(&ahb->sc_id, &ahb->sc_dev); -#endif - ahb->sc_ih = eisa_intr_establish(NULL, ahb->sc_irq, IST_LEVEL, IPL_BIO, + if (eisa_intr_map(ec, ahb->sc_irq, &ih)) { + printf("%s: couldn't map interrupt (%d)\n", + ahb->sc_dev.dv_xname, ahb->sc_irq); + return; + } + intrstr = eisa_intr_string(ec, ih); + ahb->sc_ih = eisa_intr_establish(ec, ih, IST_LEVEL, IPL_BIO, ahbintr, ahb, ahb->sc_dev.dv_xname); + if (ahb->sc_ih == NULL) { + printf("%s: couldn't establish interrupt", + ahb->sc_dev.dv_xname); + if (intrstr != NULL) + printf(" at %s", intrstr); + printf("\n"); + return; + } + if (intrstr != NULL) + printf("%s: interrupting at %s\n", ahb->sc_dev.dv_xname, + intrstr); /* * ask the adapter what subunits are present -- 2.20.1