summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorderaadt <deraadt@NetBSD.org>1993-05-11 04:06:23 +0000
committerderaadt <deraadt@NetBSD.org>1993-05-11 04:06:23 +0000
commit4c40e74463bfd8ea72a1f986ca5fffccd87d0585 (patch)
treee2f9fe7d5fd11c6e3a41540ecd3a75b0f03e25a0 /sys/dev
parent3417c8a45ba59d3308e6185c97c32b1328d67f6f (diff)
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.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/isa/isa.c6
1 files changed, 4 insertions, 2 deletions
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);