Remove all vestiges of the ALLOW_CONFLICT_FOO evil and replace it with
something slightly less evil - a per device conflict flag.
This commit is contained in:
parent
d4053fae6e
commit
9cc347481f
@ -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;
|
||||
|
@ -2,7 +2,7 @@
|
||||
# LINT -- config file for checking all the sources, tries to pull in
|
||||
# as much of the source tree as it can.
|
||||
#
|
||||
# $Id: LINT,v 1.177 1995/05/05 07:47:44 davidg Exp $
|
||||
# $Id: LINT,v 1.178 1995/05/06 19:34:05 joerg Exp $
|
||||
#
|
||||
# NB: You probably don't want to try running a kernel built from this
|
||||
# file. Instead, you should start from GENERIC, and add options from
|
||||
@ -360,21 +360,6 @@ controller isa0
|
||||
#
|
||||
# Options for `isa':
|
||||
#
|
||||
# ALLOW_CONFLICT_DRQ suppresses the DMA conflict checks. This option is
|
||||
# included so that people with sound cards that support multiple emulations
|
||||
# can setup different sound drivers on the same DMA channel. There are no
|
||||
# other known uses for this option.
|
||||
#
|
||||
# ALLOW_CONFLICT_IOADDR suppresses the I/O address conflict checks, so
|
||||
# that the PS/2 mouse driver doesn't conflict with the console driver.
|
||||
#
|
||||
# ALLOW_CONFLICT_IRQ suppresses the interrupt line conflict checks, so
|
||||
# that multiple devices can share the same IRQ, provided that the
|
||||
# hardware supports it (it usually doesn't).
|
||||
#
|
||||
# ALLOW_CONFLICT_MEMADDR suppresses the memory address conflict checks.
|
||||
# This option is not known to be good for anything.
|
||||
#
|
||||
# AUTO_EOI_1 enables the `automatic EOI' feature for the master 8259A
|
||||
# interrupt controller. This saves about 1.25 usec for each interrupt.
|
||||
# No problems are known to be caused by this option.
|
||||
@ -396,10 +381,6 @@ controller isa0
|
||||
# TUNE_1542 enables the automatic ISA bus speed selection for the
|
||||
# Adaptec 1542 boards. Does not work for all boards, use it with caution.
|
||||
#
|
||||
#options ALLOW_CONFLICT_DRQ
|
||||
#options ALLOW_CONFLICT_IOADDR
|
||||
#options ALLOW_CONFLICT_IRQ
|
||||
#options ALLOW_CONFLICT_MEMADDR
|
||||
options "AUTO_EOI_1"
|
||||
#options "AUTO_EOI_2"
|
||||
options BOUNCE_BUFFERS
|
||||
@ -534,12 +515,12 @@ options FDSEEKWAIT="16"
|
||||
#
|
||||
# lpt: printer port
|
||||
# mse: Logitech and ATI InPort bus mouse ports
|
||||
# psm: PS/2 mouse port (needs ALLOW_CONFLICT_IOADDR, above)
|
||||
# psm: PS/2 mouse port [note: conflicts with sc0/vt0, thus "conflicts" keywd]
|
||||
# sio: serial ports (see sio(4))
|
||||
|
||||
device lpt0 at isa? port "IO_LPT3" tty irq 7 vector lptintr
|
||||
device mse0 at isa? port 0x23c tty irq 5 vector mseintr
|
||||
device psm0 at isa? port "IO_KBD" tty irq 12 vector psmintr
|
||||
device psm0 at isa? port "IO_KBD" conflicts tty irq 12 vector psmintr
|
||||
device sio0 at isa? port "IO_COM1" tty irq 4 vector siointr
|
||||
|
||||
# Options for sio:
|
||||
@ -617,15 +598,17 @@ device nnic0 at isa? port 0x150 iomem 0xe0000 tty irq 12 vector nnicintr
|
||||
#
|
||||
# pca: PCM audio through your PC speaker
|
||||
#
|
||||
|
||||
# If you don't have a lpt0 device at IRQ 7, you can remove the
|
||||
# ``conflicts'' specification in the appropriate device entries below.
|
||||
#
|
||||
# Controls all sound devices
|
||||
controller snd0
|
||||
device sb0 at isa? port 0x220 irq 7 drq 1 vector sbintr
|
||||
device sb0 at isa? port 0x220 irq 7 conflicts drq 1 vector sbintr
|
||||
device sbxvi0 at isa? drq 5
|
||||
device sbmidi0 at isa? port 0x330
|
||||
device pas0 at isa? port 0x388 irq 10 drq 6 vector pasintr
|
||||
device gus0 at isa? port 0x220 irq 11 drq 1 vector gusintr
|
||||
device gusxvi0 at isa? port 0x530 irq 7 drq 3 vector adintr
|
||||
device gusxvi0 at isa? port 0x530 irq 7 conflicts drq 3 vector adintr
|
||||
device gusmax0 at isa? port 0x32c
|
||||
device mss0 at isa? port 0x530 irq 10 drq 1 vector adintr
|
||||
device opl0 at isa? port 0x388
|
||||
|
@ -2,7 +2,7 @@
|
||||
# LINT -- config file for checking all the sources, tries to pull in
|
||||
# as much of the source tree as it can.
|
||||
#
|
||||
# $Id: LINT,v 1.177 1995/05/05 07:47:44 davidg Exp $
|
||||
# $Id: LINT,v 1.178 1995/05/06 19:34:05 joerg Exp $
|
||||
#
|
||||
# NB: You probably don't want to try running a kernel built from this
|
||||
# file. Instead, you should start from GENERIC, and add options from
|
||||
@ -360,21 +360,6 @@ controller isa0
|
||||
#
|
||||
# Options for `isa':
|
||||
#
|
||||
# ALLOW_CONFLICT_DRQ suppresses the DMA conflict checks. This option is
|
||||
# included so that people with sound cards that support multiple emulations
|
||||
# can setup different sound drivers on the same DMA channel. There are no
|
||||
# other known uses for this option.
|
||||
#
|
||||
# ALLOW_CONFLICT_IOADDR suppresses the I/O address conflict checks, so
|
||||
# that the PS/2 mouse driver doesn't conflict with the console driver.
|
||||
#
|
||||
# ALLOW_CONFLICT_IRQ suppresses the interrupt line conflict checks, so
|
||||
# that multiple devices can share the same IRQ, provided that the
|
||||
# hardware supports it (it usually doesn't).
|
||||
#
|
||||
# ALLOW_CONFLICT_MEMADDR suppresses the memory address conflict checks.
|
||||
# This option is not known to be good for anything.
|
||||
#
|
||||
# AUTO_EOI_1 enables the `automatic EOI' feature for the master 8259A
|
||||
# interrupt controller. This saves about 1.25 usec for each interrupt.
|
||||
# No problems are known to be caused by this option.
|
||||
@ -396,10 +381,6 @@ controller isa0
|
||||
# TUNE_1542 enables the automatic ISA bus speed selection for the
|
||||
# Adaptec 1542 boards. Does not work for all boards, use it with caution.
|
||||
#
|
||||
#options ALLOW_CONFLICT_DRQ
|
||||
#options ALLOW_CONFLICT_IOADDR
|
||||
#options ALLOW_CONFLICT_IRQ
|
||||
#options ALLOW_CONFLICT_MEMADDR
|
||||
options "AUTO_EOI_1"
|
||||
#options "AUTO_EOI_2"
|
||||
options BOUNCE_BUFFERS
|
||||
@ -534,12 +515,12 @@ options FDSEEKWAIT="16"
|
||||
#
|
||||
# lpt: printer port
|
||||
# mse: Logitech and ATI InPort bus mouse ports
|
||||
# psm: PS/2 mouse port (needs ALLOW_CONFLICT_IOADDR, above)
|
||||
# psm: PS/2 mouse port [note: conflicts with sc0/vt0, thus "conflicts" keywd]
|
||||
# sio: serial ports (see sio(4))
|
||||
|
||||
device lpt0 at isa? port "IO_LPT3" tty irq 7 vector lptintr
|
||||
device mse0 at isa? port 0x23c tty irq 5 vector mseintr
|
||||
device psm0 at isa? port "IO_KBD" tty irq 12 vector psmintr
|
||||
device psm0 at isa? port "IO_KBD" conflicts tty irq 12 vector psmintr
|
||||
device sio0 at isa? port "IO_COM1" tty irq 4 vector siointr
|
||||
|
||||
# Options for sio:
|
||||
@ -617,15 +598,17 @@ device nnic0 at isa? port 0x150 iomem 0xe0000 tty irq 12 vector nnicintr
|
||||
#
|
||||
# pca: PCM audio through your PC speaker
|
||||
#
|
||||
|
||||
# If you don't have a lpt0 device at IRQ 7, you can remove the
|
||||
# ``conflicts'' specification in the appropriate device entries below.
|
||||
#
|
||||
# Controls all sound devices
|
||||
controller snd0
|
||||
device sb0 at isa? port 0x220 irq 7 drq 1 vector sbintr
|
||||
device sb0 at isa? port 0x220 irq 7 conflicts drq 1 vector sbintr
|
||||
device sbxvi0 at isa? drq 5
|
||||
device sbmidi0 at isa? port 0x330
|
||||
device pas0 at isa? port 0x388 irq 10 drq 6 vector pasintr
|
||||
device gus0 at isa? port 0x220 irq 11 drq 1 vector gusintr
|
||||
device gusxvi0 at isa? port 0x530 irq 7 drq 3 vector adintr
|
||||
device gusxvi0 at isa? port 0x530 irq 7 conflicts drq 3 vector adintr
|
||||
device gusmax0 at isa? port 0x32c
|
||||
device mss0 at isa? port 0x530 irq 10 drq 1 vector adintr
|
||||
device opl0 at isa? port 0x388
|
||||
|
@ -2,7 +2,7 @@
|
||||
# LINT -- config file for checking all the sources, tries to pull in
|
||||
# as much of the source tree as it can.
|
||||
#
|
||||
# $Id: LINT,v 1.177 1995/05/05 07:47:44 davidg Exp $
|
||||
# $Id: LINT,v 1.178 1995/05/06 19:34:05 joerg Exp $
|
||||
#
|
||||
# NB: You probably don't want to try running a kernel built from this
|
||||
# file. Instead, you should start from GENERIC, and add options from
|
||||
@ -360,21 +360,6 @@ controller isa0
|
||||
#
|
||||
# Options for `isa':
|
||||
#
|
||||
# ALLOW_CONFLICT_DRQ suppresses the DMA conflict checks. This option is
|
||||
# included so that people with sound cards that support multiple emulations
|
||||
# can setup different sound drivers on the same DMA channel. There are no
|
||||
# other known uses for this option.
|
||||
#
|
||||
# ALLOW_CONFLICT_IOADDR suppresses the I/O address conflict checks, so
|
||||
# that the PS/2 mouse driver doesn't conflict with the console driver.
|
||||
#
|
||||
# ALLOW_CONFLICT_IRQ suppresses the interrupt line conflict checks, so
|
||||
# that multiple devices can share the same IRQ, provided that the
|
||||
# hardware supports it (it usually doesn't).
|
||||
#
|
||||
# ALLOW_CONFLICT_MEMADDR suppresses the memory address conflict checks.
|
||||
# This option is not known to be good for anything.
|
||||
#
|
||||
# AUTO_EOI_1 enables the `automatic EOI' feature for the master 8259A
|
||||
# interrupt controller. This saves about 1.25 usec for each interrupt.
|
||||
# No problems are known to be caused by this option.
|
||||
@ -396,10 +381,6 @@ controller isa0
|
||||
# TUNE_1542 enables the automatic ISA bus speed selection for the
|
||||
# Adaptec 1542 boards. Does not work for all boards, use it with caution.
|
||||
#
|
||||
#options ALLOW_CONFLICT_DRQ
|
||||
#options ALLOW_CONFLICT_IOADDR
|
||||
#options ALLOW_CONFLICT_IRQ
|
||||
#options ALLOW_CONFLICT_MEMADDR
|
||||
options "AUTO_EOI_1"
|
||||
#options "AUTO_EOI_2"
|
||||
options BOUNCE_BUFFERS
|
||||
@ -534,12 +515,12 @@ options FDSEEKWAIT="16"
|
||||
#
|
||||
# lpt: printer port
|
||||
# mse: Logitech and ATI InPort bus mouse ports
|
||||
# psm: PS/2 mouse port (needs ALLOW_CONFLICT_IOADDR, above)
|
||||
# psm: PS/2 mouse port [note: conflicts with sc0/vt0, thus "conflicts" keywd]
|
||||
# sio: serial ports (see sio(4))
|
||||
|
||||
device lpt0 at isa? port "IO_LPT3" tty irq 7 vector lptintr
|
||||
device mse0 at isa? port 0x23c tty irq 5 vector mseintr
|
||||
device psm0 at isa? port "IO_KBD" tty irq 12 vector psmintr
|
||||
device psm0 at isa? port "IO_KBD" conflicts tty irq 12 vector psmintr
|
||||
device sio0 at isa? port "IO_COM1" tty irq 4 vector siointr
|
||||
|
||||
# Options for sio:
|
||||
@ -617,15 +598,17 @@ device nnic0 at isa? port 0x150 iomem 0xe0000 tty irq 12 vector nnicintr
|
||||
#
|
||||
# pca: PCM audio through your PC speaker
|
||||
#
|
||||
|
||||
# If you don't have a lpt0 device at IRQ 7, you can remove the
|
||||
# ``conflicts'' specification in the appropriate device entries below.
|
||||
#
|
||||
# Controls all sound devices
|
||||
controller snd0
|
||||
device sb0 at isa? port 0x220 irq 7 drq 1 vector sbintr
|
||||
device sb0 at isa? port 0x220 irq 7 conflicts drq 1 vector sbintr
|
||||
device sbxvi0 at isa? drq 5
|
||||
device sbmidi0 at isa? port 0x330
|
||||
device pas0 at isa? port 0x388 irq 10 drq 6 vector pasintr
|
||||
device gus0 at isa? port 0x220 irq 11 drq 1 vector gusintr
|
||||
device gusxvi0 at isa? port 0x530 irq 7 drq 3 vector adintr
|
||||
device gusxvi0 at isa? port 0x530 irq 7 conflicts drq 3 vector adintr
|
||||
device gusmax0 at isa? port 0x32c
|
||||
device mss0 at isa? port 0x530 irq 10 drq 1 vector adintr
|
||||
device opl0 at isa? port 0x388
|
||||
|
@ -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;
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user