summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-05-02 13:50:45 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-05-02 13:50:45 +0000
commit7828ffbca662a907b36e851b4f506dcfb096f025 (patch)
tree98beb9a8aa89529928447e4d2aac9b421c446116
parentc8dbe9ef6f76590cb48625942082992a98dc7fe4 (diff)
more verbose interrupt handling?
-rw-r--r--sys/dev/eisa/aha1742.c26
1 files 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