From: deraadt Date: Thu, 2 May 1996 13:50:44 +0000 (+0000) Subject: more verbose interrupt handling? X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=abfee1fdbd0a7f1653b780e7f8148188509bf1f6;p=openbsd more verbose interrupt handling? --- 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