diff options
Diffstat (limited to 'sys/dev/aha')
| -rw-r--r-- | sys/dev/aha/aha_isa.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/sys/dev/aha/aha_isa.c b/sys/dev/aha/aha_isa.c index d1e75c4d8276..c83ab589975f 100644 --- a/sys/dev/aha/aha_isa.c +++ b/sys/dev/aha/aha_isa.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: aha_isa.c,v 1.1 1998/09/15 07:39:55 gibbs Exp $ + * $Id: aha_isa.c,v 1.2 1998/09/24 10:43:42 bde Exp $ */ #include <sys/param.h> @@ -101,6 +101,7 @@ aha_isa_probe: Failing probe.\n", : aha_isa_ports[max_port_index].addr); return 0; } + max_port_index = port_index; } /* Attempt to find an adapter */ @@ -118,6 +119,13 @@ aha_isa_probe: Failing probe.\n", if (aha_check_probed_iop(ioport) != 0) continue; + /* + * Make sure that we do not conflict with another device's + * I/O address. + */ + if (haveseen_isadev(dev, CC_IOADDR)) + continue; + /* Allocate a softc for use during probing */ aha = aha_alloc(dev->id_unit, I386_BUS_SPACE_IO, ioport); @@ -166,6 +174,25 @@ aha_isa_probe: Failing probe.\n", dev->id_iobase = aha_isa_ports[port_index].addr; dev->id_irq = (config_data.irq << 9); dev->id_intr = aha_isa_intr; + + /* + * OK, check to make sure that we're not stepping on + * someone else's IRQ or DRQ + */ + if (haveseen_isadev(dev, CC_DRQ)) { + printf("aha_isa_probe: Aha card at I/O 0x%x's drq %d " + "conflicts, ignoring card.\n", dev->id_iobase, + dev->id_drq); + aha_free(aha); + return 0; + } + if (haveseen_isadev(dev, CC_IRQ)) { + printf("aha_isa_probe: Aha card at I/O 0x%x's irq %d " + "conflicts, ignoring card.\n", dev->id_iobase, + config_data.irq + 9); + aha_free(aha); + return 0; + } aha_unit++; return (AHA_NREGS); } |
