From 4c40e74463bfd8ea72a1f986ca5fffccd87d0585 Mon Sep 17 00:00:00 2001 From: deraadt Date: Tue, 11 May 1993 04:06:23 +0000 Subject: 1. id_irq is a u_short 2. "irq ?" sets it to (u_short)-1 3. "irq #" sets it to (1<<#) 4. not specifying an interrupt sets it to 0. Until someone else comes up with a better scheme, that's the way it is. If you have a driver that turns the interrupt off, set it to ZERO. If, after calling XXprobe(), id_irq is still (u_short)-1, that is the same as if probe() failed. --- sys/dev/isa/isa.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/isa/isa.c b/sys/dev/isa/isa.c index 40ca1a4072c..7f340d58bdc 100644 --- a/sys/dev/isa/isa.c +++ b/sys/dev/isa/isa.c @@ -35,7 +35,7 @@ * * @(#)isa.c 7.2 (Berkeley) 5/13/91 */ -static char rcsid[] = "$Header: /cvsroot/src/sys/dev/isa/isa.c,v 1.10 1993/05/08 00:50:10 deraadt Exp $"; +static char rcsid[] = "$Header: /cvsroot/src/sys/dev/isa/isa.c,v 1.11 1993/05/11 04:06:23 deraadt Exp $"; /* * code to manage AT bus @@ -137,6 +137,8 @@ config_isadev(isdp, mp) isdp->id_maddr += atdevbase; } isdp->id_alive = (*dp->probe)(isdp); + if (isdp->id_irq == (u_short)-1) + isdp->id_alive = 0; if (isdp->id_alive) { printf("%s%d", dp->name, isdp->id_unit); printf(" at 0x%x", isdp->id_iobase); @@ -145,7 +147,7 @@ config_isadev(isdp, mp) printf("-0x%x", isdp->id_iobase + isdp->id_alive - 1); printf(" "); - if (isdp->id_irq != 0x0ffff) + if (isdp->id_irq != 0) printf("irq %d ", ffs(isdp->id_irq)-1); if (isdp->id_drq != -1) printf("drq %d ", isdp->id_drq); -- cgit