diff --git a/sys/dev/isapnp/com_isapnp.c b/sys/dev/isapnp/com_isapnp.c index 77635d8a1968..562b42e54898 100644 --- a/sys/dev/isapnp/com_isapnp.c +++ b/sys/dev/isapnp/com_isapnp.c @@ -1,4 +1,4 @@ -/* $NetBSD: com_isapnp.c,v 1.7 1997/10/23 06:14:11 mikel Exp $ */ +/* $NetBSD: com_isapnp.c,v 1.8 1997/10/28 21:27:55 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -113,5 +113,5 @@ com_isapnp_attach(parent, self, aux) com_attach_subr(sc); isc->sc_ih = isa_intr_establish(ipa->ipa_ic, ipa->ipa_irq[0].num, - IST_EDGE, IPL_SERIAL, comintr, sc); + ipa->ipa_irq[0].type, IPL_SERIAL, comintr, sc); } diff --git a/sys/dev/isapnp/if_ep_isapnp.c b/sys/dev/isapnp/if_ep_isapnp.c index 18f60e049a17..6c457b34f80b 100644 --- a/sys/dev/isapnp/if_ep_isapnp.c +++ b/sys/dev/isapnp/if_ep_isapnp.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ep_isapnp.c,v 1.9 1997/10/14 21:34:30 thorpej Exp $ */ +/* $NetBSD: if_ep_isapnp.c,v 1.10 1997/10/28 21:27:59 christos Exp $ */ /* * Copyright (c) 1997 Jonathan Stone @@ -132,7 +132,7 @@ ep_isapnp_attach(parent, self, aux) ipa->ipa_devclass); sc->sc_ih = isa_intr_establish(ipa->ipa_ic, ipa->ipa_irq[0].num, - IST_EDGE, IPL_NET, epintr, sc); + ipa->ipa_irq[0].type, IPL_NET, epintr, sc); sc->enable = NULL; sc->disable = NULL; diff --git a/sys/dev/isapnp/if_le_isapnp.c b/sys/dev/isapnp/if_le_isapnp.c index a5f39535669f..4394ed3f761a 100644 --- a/sys/dev/isapnp/if_le_isapnp.c +++ b/sys/dev/isapnp/if_le_isapnp.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_le_isapnp.c,v 1.5 1997/06/06 23:46:39 thorpej Exp $ */ +/* $NetBSD: if_le_isapnp.c,v 1.6 1997/10/28 21:28:03 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -278,7 +278,7 @@ le_isapnp_attach(parent, self, aux) isa_dmacascade(parent->dv_parent, ipa->ipa_drq[0].num); lesc->sc_ih = isa_intr_establish(ipa->ipa_ic, ipa->ipa_irq[0].num, - IST_EDGE, IPL_NET, le_isapnp_intredge, sc); + ipa->ipa_irq[0].type, IPL_NET, le_isapnp_intredge, sc); } diff --git a/sys/dev/isapnp/if_ne_isapnp.c b/sys/dev/isapnp/if_ne_isapnp.c index 93189ad9a602..0499096558df 100644 --- a/sys/dev/isapnp/if_ne_isapnp.c +++ b/sys/dev/isapnp/if_ne_isapnp.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ne_isapnp.c,v 1.1 1997/10/16 17:18:29 matt Exp $ */ +/* $NetBSD: if_ne_isapnp.c,v 1.2 1997/10/28 21:28:06 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -209,7 +209,7 @@ ne_isapnp_attach( /* Establish the interrupt handler. */ isc->sc_ih = isa_intr_establish(ipa->ipa_ic, ipa->ipa_irq[0].num, - IST_EDGE, IPL_NET, dp8390_intr, dsc); + ipa->ipa_irq[0].type, IPL_NET, dp8390_intr, dsc); if (isc->sc_ih == NULL) printf("%s: couldn't establish interrupt handler\n", dsc->sc_dev.dv_xname); diff --git a/sys/dev/isapnp/isapnp.c b/sys/dev/isapnp/isapnp.c index 34b6ed47da50..87bde058ace9 100644 --- a/sys/dev/isapnp/isapnp.c +++ b/sys/dev/isapnp/isapnp.c @@ -1,4 +1,4 @@ -/* $NetBSD: isapnp.c,v 1.11 1997/10/27 23:42:30 thorpej Exp $ */ +/* $NetBSD: isapnp.c,v 1.12 1997/10/28 21:28:10 christos Exp $ */ /* * Copyright (c) 1996 Christos Zoulas. All rights reserved. @@ -228,18 +228,15 @@ isapnp_alloc_irq(ic, i) struct isapnp_pin *i; { int irq; +#define LEVEL_IRQ (ISAPNP_IRQTYPE_LEVEL_PLUS|ISAPNP_IRQTYPE_LEVEL_MINUS) + i->type = (i->flags & LEVEL_IRQ) ? IST_LEVEL : IST_EDGE; if (i->bits == 0) { i->num = 0; return 0; } - /* - * XXX Are there any PnP cards with level triggered interrupts? - * XXX If so, we'll have to change the interface that configures - * XXX the cards to convey that information. - */ - if (isa_intr_alloc(ic, i->bits, IST_EDGE, &irq) == 0) { + if (isa_intr_alloc(ic, i->bits, i->type, &irq) == 0) { i->num = irq; return 0; } @@ -842,13 +839,10 @@ isapnp_attach(parent, self, aux) } #endif -#ifdef DEBUG - /* XXX do we even really need this? --thorpej */ - printf("%s: configuring <%s, %s, %s, %s>\n", + DPRINTF(("%s: configuring <%s, %s, %s, %s>\n", sc->sc_dev.dv_xname, lpa->ipa_devident, lpa->ipa_devlogic, - lpa->ipa_devcompat, lpa->ipa_devclass); -#endif + lpa->ipa_devcompat, lpa->ipa_devclass)); if (lpa->ipa_pref == ISAPNP_DEP_CONFLICTING) { printf("%s: <%s, %s, %s, %s> ignored; %s\n", sc->sc_dev.dv_xname, diff --git a/sys/dev/isapnp/isapnpvar.h b/sys/dev/isapnp/isapnpvar.h index b37ca799156a..c9805a13e5e7 100644 --- a/sys/dev/isapnp/isapnpvar.h +++ b/sys/dev/isapnp/isapnpvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: isapnpvar.h,v 1.6 1997/10/27 22:16:52 thorpej Exp $ */ +/* $NetBSD: isapnpvar.h,v 1.7 1997/10/28 21:28:15 christos Exp $ */ /* * Copyright (c) 1996 Christos Zoulas. All rights reserved. @@ -113,10 +113,10 @@ struct isapnp_region { }; struct isapnp_pin { - u_int8_t num; - + u_int8_t num; + u_int8_t flags:4; + u_int8_t type:4; u_int16_t bits; - u_int8_t flags; }; struct isapnp_attach_args {