-/* $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 $ */
/*
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