summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-05-11 02:15:55 +0000
committerjkh <jkh@FreeBSD.org>1995-05-11 02:15:55 +0000
commitf622ff4fe55ed84e844559b7ab7ef749ee83a214 (patch)
tree2f1e3905d475ad44a74bf867f4223b0689b84da3 /sys/i386/isa
parenta8ee06f997993d5985f7fd2b4f5ec313f45e2375 (diff)
downloadFreeBSD-src-f622ff4fe55ed84e844559b7ab7ef749ee83a214.zip
FreeBSD-src-f622ff4fe55ed84e844559b7ab7ef749ee83a214.tar.gz
Remove all vestiges of the ALLOW_CONFLICT_FOO evil and replace it with
something slightly less evil - a per device conflict flag.
Diffstat (limited to 'sys/i386/isa')
-rw-r--r--sys/i386/isa/isa.c17
-rw-r--r--sys/i386/isa/isa_device.h8
2 files changed, 12 insertions, 13 deletions
diff --git a/sys/i386/isa/isa.c b/sys/i386/isa/isa.c
index edb6ba3..93dbfcf 100644
--- a/sys/i386/isa/isa.c
+++ b/sys/i386/isa/isa.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: isa.c,v 1.45 1995/04/12 20:47:54 wollman Exp $
+ * $Id: isa.c,v 1.46 1995/04/23 09:13:07 julian Exp $
*/
/*
@@ -161,7 +161,7 @@ conflict(dvp, tmpdvp, item, whatnot, reason, format)
}
/*
- * Check to see if things are alread in use, like IRQ's, I/O addresses
+ * Check to see if things are already in use, like IRQ's, I/O addresses
* and Memory addresses.
*/
static int
@@ -171,9 +171,10 @@ haveseen(dvp, tmpdvp, checkbits)
u_int checkbits;
{
/*
- * Only check against devices that have already been found
+ * Only check against devices that have already been found and are not
+ * unilaterally allowed to conflict anyway.
*/
- if (tmpdvp->id_alive) {
+ if (tmpdvp->id_alive && !tmpdev->id_conflicts) {
char const *whatnot;
whatnot = checkbits & CC_ATTACH ? "attach" : "prob";
@@ -401,15 +402,9 @@ config_isadev_c(isdp, mp, reconfig)
struct isa_driver *dp = isdp->id_driver;
checkbits = 0;
-#ifndef ALLOW_CONFLICT_DRQ
checkbits |= CC_DRQ;
-#endif
-#ifndef ALLOW_CONFLICT_IOADDR
checkbits |= CC_IOADDR;
-#endif
-#ifndef ALLOW_CONFLICT_MEMADDR
checkbits |= CC_MEMADDR;
-#endif
if (!isdp->id_enabled) {
printf("%s%d: disabled, not probed.\n",
dp->name, isdp->id_unit);
@@ -476,9 +471,7 @@ config_isadev_c(isdp, mp, reconfig)
* already skip the early check for IRQs and force
* a check for IRQs in the next group of checks.
*/
-#ifndef ALLOW_CONFLICT_IRQ
checkbits |= CC_IRQ;
-#endif
if (haveseen_isadev(isdp, checkbits))
return;
isdp->id_alive = id_alive;
diff --git a/sys/i386/isa/isa_device.h b/sys/i386/isa/isa_device.h
index c21d35a..5ef4e67 100644
--- a/sys/i386/isa/isa_device.h
+++ b/sys/i386/isa/isa_device.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa_device.h 7.1 (Berkeley) 5/9/91
- * $Id: isa_device.h,v 1.20 1995/03/28 07:55:39 bde Exp $
+ * $Id: isa_device.h,v 1.21 1995/04/23 09:13:08 julian Exp $
*/
#ifndef _I386_ISA_ISA_DEVICE_H_
@@ -57,6 +57,11 @@ typedef void inthand2_t __P((int unit));
/*
* Per device structure.
+ *
+ * XXX Note: id_conflicts should either become an array of things we're
+ * specifically allowed to conflict with or be subsumed into some
+ * more powerful mechanism for detecting and dealing with multiple types
+ * of non-fatal conflict. -jkh XXX
*/
struct isa_device {
int id_id; /* device id */
@@ -69,6 +74,7 @@ struct isa_device {
inthand2_t *id_intr; /* interrupt interface routine */
int id_unit; /* unit number */
int id_flags; /* flags */
+ int id_conflicts; /* we're allowed to conflict with things */
int id_scsiid; /* scsi id if needed */
int id_alive; /* device is present */
#define RI_FAST 1 /* fast interrupt handler */
OpenPOWER on IntegriCloud