summaryrefslogtreecommitdiff
path: root/sys/dev/buslogic
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>1998-10-10 00:44:12 +0000
committerWarner Losh <imp@FreeBSD.org>1998-10-10 00:44:12 +0000
commit19bed41a5df7cc0eeda8d761596af8272bc420aa (patch)
treefaa1c734d623a6b64c21b1bfd271cbc16f6c780a /sys/dev/buslogic
parent51f3fe7ab284f0f713287674fa0ffb6d29c30f89 (diff)
Notes
Diffstat (limited to 'sys/dev/buslogic')
-rw-r--r--sys/dev/buslogic/bt_isa.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/sys/dev/buslogic/bt_isa.c b/sys/dev/buslogic/bt_isa.c
index b74752ab6f7b..5473bf268d8f 100644
--- a/sys/dev/buslogic/bt_isa.c
+++ b/sys/dev/buslogic/bt_isa.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: bt_isa.c,v 1.1 1998/09/15 07:32:54 gibbs Exp $
+ * $Id: bt_isa.c,v 1.2 1998/09/24 10:43:42 bde Exp $
*/
#include <sys/param.h>
@@ -102,6 +102,7 @@ bt_isa_probe: Failing probe.\n",
: bt_isa_ports[max_port_index].addr);
return 0;
}
+ max_port_index = port_index;
}
/* Attempt to find an adapter */
@@ -119,6 +120,13 @@ bt_isa_probe: Failing probe.\n",
if (bt_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 */
bt = bt_alloc(dev->id_unit, I386_BUS_SPACE_IO, ioport);
@@ -173,6 +181,25 @@ bt_isa_probe: Failing probe.\n",
dev->id_iobase = bt_isa_ports[port_index].addr;
dev->id_irq = (config_data.irq << 9);
dev->id_intr = bt_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("bt_isa_probe: Bt card at I/O 0x%x's drq %d "
+ "conflicts, ignoring card.\n", dev->id_iobase,
+ dev->id_drq);
+ bt_free(bt);
+ return 0;
+ }
+ if (haveseen_isadev(dev, CC_IRQ)) {
+ printf("bt_isa_probe: Bt card at I/O 0x%x's irq %d "
+ "conflicts, ignoring card.\n", dev->id_iobase,
+ config_data.irq + 9);
+ bt_free(bt);
+ return 0;
+ }
bt_unit++;
return (BT_NREGS);
}