diff --git a/sys/arch/i386/pnpbios/ess_pnpbios.c b/sys/arch/i386/pnpbios/ess_pnpbios.c index 10f24ee94ed7..aebfa8af6949 100644 --- a/sys/arch/i386/pnpbios/ess_pnpbios.c +++ b/sys/arch/i386/pnpbios/ess_pnpbios.c @@ -1,4 +1,4 @@ -/* $NetBSD: ess_pnpbios.c,v 1.3 2000/03/04 23:08:54 nathanw Exp $ */ +/* $NetBSD: ess_pnpbios.c,v 1.4 2000/04/22 06:38:24 thorpej Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -101,12 +101,14 @@ ess_pnpbios_attach(parent, self, aux) sc->sc_audio1.ist = IST_EDGE; sc->sc_audio2.ist = IST_EDGE; - if (pnpbios_getirqnum(aa->pbt, aa->resc, 0, &sc->sc_audio1.irq)) { + if (pnpbios_getirqnum(aa->pbt, aa->resc, 0, &sc->sc_audio1.irq, + NULL)) { printf(": can't get IRQ\n"); return; } - if (pnpbios_getirqnum(aa->pbt, aa->resc, 1, &sc->sc_audio2.irq)) + if (pnpbios_getirqnum(aa->pbt, aa->resc, 1, &sc->sc_audio2.irq, + NULL)) sc->sc_audio2.irq = -1; if (pnpbios_getdmachan(aa->pbt, aa->resc, 0, &sc->sc_audio1.drq)) { diff --git a/sys/arch/i386/pnpbios/pnpbios.c b/sys/arch/i386/pnpbios/pnpbios.c index 02fe026bf84b..ba3674f47823 100644 --- a/sys/arch/i386/pnpbios/pnpbios.c +++ b/sys/arch/i386/pnpbios/pnpbios.c @@ -1,4 +1,4 @@ -/* $NetBSD: pnpbios.c,v 1.12 2000/03/01 20:23:55 groo Exp $ */ +/* $NetBSD: pnpbios.c,v 1.13 2000/04/22 06:38:24 thorpej Exp $ */ /* * Copyright (c) 2000 Christian E. Hopps. All rights reserved. * Copyright (c) 1999 @@ -1239,11 +1239,12 @@ pnpbios_intr_establish(pbt, resc, idx, level, fcn, arg) } int -pnpbios_getirqnum(pbt, resc, idx, irqp) +pnpbios_getirqnum(pbt, resc, idx, irqp, istp) pnpbios_tag_t pbt; struct pnpresources *resc; int idx; int *irqp; + int *istp; { struct pnp_irq *irq; @@ -1254,7 +1255,10 @@ pnpbios_getirqnum(pbt, resc, idx, irqp) while (idx--) irq = SIMPLEQ_NEXT(irq, next); - *irqp = ffs(irq->mask) - 1; + if (irqp != NULL) + *irqp = ffs(irq->mask) - 1; + if (istp != NULL) + *istp = (irq->flags & 0x0c) ? IST_LEVEL : IST_EDGE; return (0); } diff --git a/sys/arch/i386/pnpbios/pnpbiosvar.h b/sys/arch/i386/pnpbios/pnpbiosvar.h index 7f0b286551cc..702eea5c3f8f 100644 --- a/sys/arch/i386/pnpbios/pnpbiosvar.h +++ b/sys/arch/i386/pnpbios/pnpbiosvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: pnpbiosvar.h,v 1.3 2000/03/01 20:23:55 groo Exp $ */ +/* $NetBSD: pnpbiosvar.h,v 1.4 2000/04/22 06:38:24 thorpej Exp $ */ /* * Copyright (c) 1999 * Matthias Drochner. All rights reserved. @@ -94,7 +94,8 @@ void *pnpbios_intr_establish __P((pnpbios_tag_t, struct pnpresources *, int, int pnpbios_getiobase __P((pnpbios_tag_t, struct pnpresources *, int, bus_space_tag_t *, int *)); -int pnpbios_getirqnum __P((pnpbios_tag_t, struct pnpresources *, int, int *)); +int pnpbios_getirqnum __P((pnpbios_tag_t, struct pnpresources *, int, int *, + int *)); int pnpbios_getdmachan __P((pnpbios_tag_t, struct pnpresources *, int, int *)); void pnpbios_print_devres __P((struct device *, struct pnpbiosdev_attach_args *)); diff --git a/sys/arch/i386/pnpbios/sb_pnpbios.c b/sys/arch/i386/pnpbios/sb_pnpbios.c index 1a3c14b518ba..e2a017bff1e4 100644 --- a/sys/arch/i386/pnpbios/sb_pnpbios.c +++ b/sys/arch/i386/pnpbios/sb_pnpbios.c @@ -1,4 +1,4 @@ -/* $NetBSD: sb_pnpbios.c,v 1.2 1999/11/14 02:15:51 thorpej Exp $ */ +/* $NetBSD: sb_pnpbios.c,v 1.3 2000/04/22 06:38:24 thorpej Exp $ */ /* * Copyright (c) 1999 * Matthias Drochner. All rights reserved. @@ -89,7 +89,8 @@ sb_pnpbios_attach(parent, self, aux) /* XXX These are only for setting chip configuration registers. */ pnpbios_getiobase(aa->pbt, aa->resc, 0, 0, &sc->sc_iobase); - if (pnpbios_getirqnum(aa->pbt, aa->resc, 0, &sc->sc_irq)) { + if (pnpbios_getirqnum(aa->pbt, aa->resc, 0, &sc->sc_irq, + NULL)) { printf(": can't get IRQ\n"); return; } diff --git a/sys/arch/i386/pnpbios/wss_pnpbios.c b/sys/arch/i386/pnpbios/wss_pnpbios.c index 0781a66f592b..6f086237047c 100644 --- a/sys/arch/i386/pnpbios/wss_pnpbios.c +++ b/sys/arch/i386/pnpbios/wss_pnpbios.c @@ -1,4 +1,4 @@ -/* $NetBSD: wss_pnpbios.c,v 1.3 2000/02/20 22:03:49 groo Exp $ */ +/* $NetBSD: wss_pnpbios.c,v 1.4 2000/04/22 06:38:24 thorpej Exp $ */ /* * Copyright (c) 1999 * Matthias Drochner. All rights reserved. @@ -131,7 +131,7 @@ wss_pnpbios_attach(parent, self, aux) sc->wss_ic = aa->ic; - if (pnpbios_getirqnum(aa->pbt, aa->resc, 0, &sc->wss_irq)) { + if (pnpbios_getirqnum(aa->pbt, aa->resc, 0, &sc->wss_irq, NULL)) { printf(": can't get IRQ\n"); return; } diff --git a/sys/arch/i386/pnpbios/ym_pnpbios.c b/sys/arch/i386/pnpbios/ym_pnpbios.c index a9d4067d72b1..ae49283f7280 100644 --- a/sys/arch/i386/pnpbios/ym_pnpbios.c +++ b/sys/arch/i386/pnpbios/ym_pnpbios.c @@ -1,4 +1,4 @@ -/* $NetBSD: ym_pnpbios.c,v 1.2 1999/11/14 02:15:51 thorpej Exp $ */ +/* $NetBSD: ym_pnpbios.c,v 1.3 2000/04/22 06:38:25 thorpej Exp $ */ /* * Copyright (c) 1999 * Matthias Drochner. All rights reserved. @@ -118,7 +118,7 @@ ym_pnpbios_attach(parent, self, aux) sc->sc_ic = aa->ic; - if (pnpbios_getirqnum(aa->pbt, aa->resc, 0, &sc->ym_irq)) { + if (pnpbios_getirqnum(aa->pbt, aa->resc, 0, &sc->ym_irq, NULL)) { printf(": can't get IRQ\n"); return; }