summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/isa/isa.c62
-rw-r--r--sys/dev/ed/if_ed.c5
-rw-r--r--sys/dev/syscons/syscons.c4
-rw-r--r--sys/i386/isa/bt742a.c29
-rw-r--r--sys/i386/isa/if_ed.c5
-rw-r--r--sys/i386/isa/isa.c62
-rw-r--r--sys/i386/isa/isa_device.h3
-rw-r--r--sys/i386/isa/syscons.c4
-rw-r--r--sys/isa/syscons.c4
9 files changed, 127 insertions, 51 deletions
diff --git a/sys/amd64/isa/isa.c b/sys/amd64/isa/isa.c
index 2f93fccb6766..5a320b357e23 100644
--- a/sys/amd64/isa/isa.c
+++ b/sys/amd64/isa/isa.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: isa.c,v 1.26 1994/09/30 05:35:55 swallace Exp $
+ * $Id: isa.c,v 1.27 1994/10/01 02:56:14 davidg Exp $
*/
/*
@@ -162,8 +162,6 @@ haveseen(dvp, tmpdvp, checkbits)
struct isa_device *tmpdvp;
u_int checkbits;
{
- int status = 0;
-
/*
* Only check against devices that have already been found
*/
@@ -183,7 +181,7 @@ haveseen(dvp, tmpdvp, checkbits)
(tmpdvp->id_iobase + tmpdvp->id_alive - 1))) {
conflict(dvp, tmpdvp, dvp->id_iobase, whatnot,
"I/O address", "0x%x");
- status = 1;
+ return 1;
}
}
/*
@@ -202,7 +200,7 @@ haveseen(dvp, tmpdvp, checkbits)
(tmpdvp->id_maddr + tmpdvp->id_msize - 1))) {
conflict(dvp, tmpdvp, (int)dvp->id_maddr,
whatnot, "maddr", "0x%x");
- status = 1;
+ return 1;
}
}
/*
@@ -212,7 +210,7 @@ haveseen(dvp, tmpdvp, checkbits)
if (tmpdvp->id_irq == dvp->id_irq) {
conflict(dvp, tmpdvp, ffs(dvp->id_irq) - 1,
whatnot, "irq", "%d");
- status = 1;
+ return 1;
}
}
/*
@@ -222,11 +220,11 @@ haveseen(dvp, tmpdvp, checkbits)
if (tmpdvp->id_drq == dvp->id_drq) {
conflict(dvp, tmpdvp, dvp->id_drq, whatnot,
"drq", "%d");
- status = 1;
+ return 1;
}
}
}
- return (status);
+ return 0;
}
/*
@@ -241,14 +239,26 @@ haveseen_isadev(dvp, checkbits)
struct isa_device *tmpdvp;
int status = 0;
- for (tmpdvp = isa_devtab_tty; tmpdvp->id_driver; tmpdvp++)
+ for (tmpdvp = isa_devtab_tty; tmpdvp->id_driver; tmpdvp++) {
status |= haveseen(dvp, tmpdvp, checkbits);
- for (tmpdvp = isa_devtab_bio; tmpdvp->id_driver; tmpdvp++)
+ if (status)
+ return status;
+ }
+ for (tmpdvp = isa_devtab_bio; tmpdvp->id_driver; tmpdvp++) {
status |= haveseen(dvp, tmpdvp, checkbits);
- for (tmpdvp = isa_devtab_net; tmpdvp->id_driver; tmpdvp++)
+ if (status)
+ return status;
+ }
+ for (tmpdvp = isa_devtab_net; tmpdvp->id_driver; tmpdvp++) {
status |= haveseen(dvp, tmpdvp, checkbits);
- for (tmpdvp = isa_devtab_null; tmpdvp->id_driver; tmpdvp++)
+ if (status)
+ return status;
+ }
+ for (tmpdvp = isa_devtab_null; tmpdvp->id_driver; tmpdvp++) {
status |= haveseen(dvp, tmpdvp, checkbits);
+ if (status)
+ return status;
+ }
return(status);
}
@@ -263,14 +273,34 @@ isa_configure() {
enable_intr();
INTREN(IRQ_SLAVE);
printf("Probing for devices on the ISA bus:\n");
+ /* First probe all the sensitive probes */
for (dvp = isa_devtab_tty; dvp->id_driver; dvp++)
- config_isadev(dvp, &tty_imask);
+ if (dvp->id_driver->sensitive_hw)
+ config_isadev(dvp, &tty_imask);
for (dvp = isa_devtab_bio; dvp->id_driver; dvp++)
- config_isadev(dvp, &bio_imask);
+ if (dvp->id_driver->sensitive_hw)
+ config_isadev(dvp, &bio_imask);
for (dvp = isa_devtab_net; dvp->id_driver; dvp++)
- config_isadev(dvp, &net_imask);
+ if (dvp->id_driver->sensitive_hw)
+ config_isadev(dvp, &net_imask);
for (dvp = isa_devtab_null; dvp->id_driver; dvp++)
- config_isadev(dvp, (u_int *)NULL);
+ if (dvp->id_driver->sensitive_hw)
+ config_isadev(dvp, (u_int *)NULL);
+
+ /* Then all the bad ones */
+ for (dvp = isa_devtab_tty; dvp->id_driver; dvp++)
+ if (!dvp->id_driver->sensitive_hw)
+ config_isadev(dvp, &tty_imask);
+ for (dvp = isa_devtab_bio; dvp->id_driver; dvp++)
+ if (!dvp->id_driver->sensitive_hw)
+ config_isadev(dvp, &bio_imask);
+ for (dvp = isa_devtab_net; dvp->id_driver; dvp++)
+ if (!dvp->id_driver->sensitive_hw)
+ config_isadev(dvp, &net_imask);
+ for (dvp = isa_devtab_null; dvp->id_driver; dvp++)
+ if (!dvp->id_driver->sensitive_hw)
+ config_isadev(dvp, (u_int *)NULL);
+
bio_imask |= SWI_CLOCK_MASK;
net_imask |= SWI_NET_MASK;
tty_imask |= SWI_TTY_MASK;
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index 47a9ff50f1af..38b7f4483568 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/if_ed.c
@@ -13,7 +13,7 @@
* the SMC Elite Ultra (8216), the 3Com 3c503, the NE1000 and NE2000,
* and a variety of similar clones.
*
- * $Id: if_ed.c,v 1.49 1994/10/08 09:24:20 davidg Exp $
+ * $Id: if_ed.c,v 1.50 1994/10/14 11:56:36 davidg Exp $
*/
#include "ed.h"
@@ -128,7 +128,8 @@ void ed_setrcr(struct ifnet *, struct ed_softc *);
struct isa_driver eddriver = {
ed_probe,
ed_attach,
- "ed"
+ "ed",
+ 1 /* We are ultra sensitive */
};
/*
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 6e7afea06093..35404eb1c292 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: syscons.c,v 1.65 1994/10/15 21:33:58 ache Exp $
+ * $Id: syscons.c,v 1.66 1994/10/17 12:44:02 ache Exp $
*/
#include "sc.h"
@@ -286,7 +286,7 @@ extern char *video_mode_ptr;
int color_display = -1;
struct isa_driver scdriver = {
- pcprobe, pcattach, "sc",
+ pcprobe, pcattach, "sc", 1
};
int
diff --git a/sys/i386/isa/bt742a.c b/sys/i386/isa/bt742a.c
index 60671f3c5636..edbc2403c0fc 100644
--- a/sys/i386/isa/bt742a.c
+++ b/sys/i386/isa/bt742a.c
@@ -12,7 +12,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
- * $Id: bt742a.c,v 1.26 1994/10/10 00:46:09 jkh Exp $
+ * $Id: bt742a.c,v 1.27 1994/10/12 04:15:30 phk Exp $
*/
/*
@@ -403,6 +403,7 @@ struct bt_ccb *bt_get_ccb();
struct bt_ccb *bt_ccb_phys_kv();
static int btunit = 0;
+static int btprobing = 0;
struct isa_driver btdriver =
{
@@ -500,7 +501,9 @@ bt_cmd(unit, icnt, ocnt, wait, retval, opcode, args)
DELAY(10);
}
if (i == 0) {
- printf("bt%d: bt_cmd, host not idle(0x%x)\n", unit, sts);
+ if(!btprobing)
+ printf("bt%d: bt_cmd, host not idle(0x%x)\n",
+ unit, sts);
return (ENXIO);
}
}
@@ -527,7 +530,9 @@ bt_cmd(unit, icnt, ocnt, wait, retval, opcode, args)
DELAY(10);
}
if (i == 0) {
- printf("bt%d: bt_cmd, cmd/data port full\n", unit);
+ if(!btprobing)
+ printf("bt%d: bt_cmd, cmd/data port full\n",
+ unit);
outb(BT_CTRL_STAT_PORT, BT_SRST);
return (ENXIO);
}
@@ -546,8 +551,9 @@ bt_cmd(unit, icnt, ocnt, wait, retval, opcode, args)
DELAY(10);
}
if (i == 0) {
- printf("bt%d: bt_cmd, cmd/data port empty %d\n",
- unit, ocnt);
+ if(!btprobing)
+ printf("bt%d: bt_cmd, cmd/data port empty %d\n",
+ unit, ocnt);
return (ENXIO);
}
oc = inb(BT_CMD_DATA_PORT);
@@ -566,7 +572,9 @@ bt_cmd(unit, icnt, ocnt, wait, retval, opcode, args)
DELAY(10);
}
if (i == 0) {
- printf("bt%d: bt_cmd, host not finished(0x%x)\n", unit, sts);
+ if(!btprobing)
+ printf("bt%d: bt_cmd, host not finished(0x%x)\n",
+ unit, sts);
return (ENXIO);
}
outb(BT_CTRL_STAT_PORT, BT_IRST);
@@ -589,6 +597,7 @@ btprobe(dev)
int unit = btunit;
struct bt_data *bt;
+ btprobing = 1;
if (unit >= NBT) {
printf("bt%d: unit number too high\n", unit);
return 0;
@@ -638,7 +647,8 @@ btattach(dev)
{
int unit = dev->id_unit;
struct bt_data *bt = btdata[unit];
-
+
+ btprobing = 0;
/*
* fill in the prototype scsi_link.
*/
@@ -1075,7 +1085,10 @@ bt_init(unit)
* Displaying Board ID and Hardware Revision
* 94/05/18 amurai@spec.co.jp
*/
- bt_cmd(unit, 1, sizeof(binfo),0,&binfo,BT_GET_BOARD_INFO,sizeof(binfo));
+ i = bt_cmd(unit, 1, sizeof(binfo),0,
+ &binfo,BT_GET_BOARD_INFO,sizeof(binfo));
+ if(i)
+ return i;
printf("bt%d: Bt%c%c%c%c/%c%d-", unit,
binfo.id[0],
binfo.id[1],
diff --git a/sys/i386/isa/if_ed.c b/sys/i386/isa/if_ed.c
index 47a9ff50f1af..38b7f4483568 100644
--- a/sys/i386/isa/if_ed.c
+++ b/sys/i386/isa/if_ed.c
@@ -13,7 +13,7 @@
* the SMC Elite Ultra (8216), the 3Com 3c503, the NE1000 and NE2000,
* and a variety of similar clones.
*
- * $Id: if_ed.c,v 1.49 1994/10/08 09:24:20 davidg Exp $
+ * $Id: if_ed.c,v 1.50 1994/10/14 11:56:36 davidg Exp $
*/
#include "ed.h"
@@ -128,7 +128,8 @@ void ed_setrcr(struct ifnet *, struct ed_softc *);
struct isa_driver eddriver = {
ed_probe,
ed_attach,
- "ed"
+ "ed",
+ 1 /* We are ultra sensitive */
};
/*
diff --git a/sys/i386/isa/isa.c b/sys/i386/isa/isa.c
index 2f93fccb6766..5a320b357e23 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.26 1994/09/30 05:35:55 swallace Exp $
+ * $Id: isa.c,v 1.27 1994/10/01 02:56:14 davidg Exp $
*/
/*
@@ -162,8 +162,6 @@ haveseen(dvp, tmpdvp, checkbits)
struct isa_device *tmpdvp;
u_int checkbits;
{
- int status = 0;
-
/*
* Only check against devices that have already been found
*/
@@ -183,7 +181,7 @@ haveseen(dvp, tmpdvp, checkbits)
(tmpdvp->id_iobase + tmpdvp->id_alive - 1))) {
conflict(dvp, tmpdvp, dvp->id_iobase, whatnot,
"I/O address", "0x%x");
- status = 1;
+ return 1;
}
}
/*
@@ -202,7 +200,7 @@ haveseen(dvp, tmpdvp, checkbits)
(tmpdvp->id_maddr + tmpdvp->id_msize - 1))) {
conflict(dvp, tmpdvp, (int)dvp->id_maddr,
whatnot, "maddr", "0x%x");
- status = 1;
+ return 1;
}
}
/*
@@ -212,7 +210,7 @@ haveseen(dvp, tmpdvp, checkbits)
if (tmpdvp->id_irq == dvp->id_irq) {
conflict(dvp, tmpdvp, ffs(dvp->id_irq) - 1,
whatnot, "irq", "%d");
- status = 1;
+ return 1;
}
}
/*
@@ -222,11 +220,11 @@ haveseen(dvp, tmpdvp, checkbits)
if (tmpdvp->id_drq == dvp->id_drq) {
conflict(dvp, tmpdvp, dvp->id_drq, whatnot,
"drq", "%d");
- status = 1;
+ return 1;
}
}
}
- return (status);
+ return 0;
}
/*
@@ -241,14 +239,26 @@ haveseen_isadev(dvp, checkbits)
struct isa_device *tmpdvp;
int status = 0;
- for (tmpdvp = isa_devtab_tty; tmpdvp->id_driver; tmpdvp++)
+ for (tmpdvp = isa_devtab_tty; tmpdvp->id_driver; tmpdvp++) {
status |= haveseen(dvp, tmpdvp, checkbits);
- for (tmpdvp = isa_devtab_bio; tmpdvp->id_driver; tmpdvp++)
+ if (status)
+ return status;
+ }
+ for (tmpdvp = isa_devtab_bio; tmpdvp->id_driver; tmpdvp++) {
status |= haveseen(dvp, tmpdvp, checkbits);
- for (tmpdvp = isa_devtab_net; tmpdvp->id_driver; tmpdvp++)
+ if (status)
+ return status;
+ }
+ for (tmpdvp = isa_devtab_net; tmpdvp->id_driver; tmpdvp++) {
status |= haveseen(dvp, tmpdvp, checkbits);
- for (tmpdvp = isa_devtab_null; tmpdvp->id_driver; tmpdvp++)
+ if (status)
+ return status;
+ }
+ for (tmpdvp = isa_devtab_null; tmpdvp->id_driver; tmpdvp++) {
status |= haveseen(dvp, tmpdvp, checkbits);
+ if (status)
+ return status;
+ }
return(status);
}
@@ -263,14 +273,34 @@ isa_configure() {
enable_intr();
INTREN(IRQ_SLAVE);
printf("Probing for devices on the ISA bus:\n");
+ /* First probe all the sensitive probes */
for (dvp = isa_devtab_tty; dvp->id_driver; dvp++)
- config_isadev(dvp, &tty_imask);
+ if (dvp->id_driver->sensitive_hw)
+ config_isadev(dvp, &tty_imask);
for (dvp = isa_devtab_bio; dvp->id_driver; dvp++)
- config_isadev(dvp, &bio_imask);
+ if (dvp->id_driver->sensitive_hw)
+ config_isadev(dvp, &bio_imask);
for (dvp = isa_devtab_net; dvp->id_driver; dvp++)
- config_isadev(dvp, &net_imask);
+ if (dvp->id_driver->sensitive_hw)
+ config_isadev(dvp, &net_imask);
for (dvp = isa_devtab_null; dvp->id_driver; dvp++)
- config_isadev(dvp, (u_int *)NULL);
+ if (dvp->id_driver->sensitive_hw)
+ config_isadev(dvp, (u_int *)NULL);
+
+ /* Then all the bad ones */
+ for (dvp = isa_devtab_tty; dvp->id_driver; dvp++)
+ if (!dvp->id_driver->sensitive_hw)
+ config_isadev(dvp, &tty_imask);
+ for (dvp = isa_devtab_bio; dvp->id_driver; dvp++)
+ if (!dvp->id_driver->sensitive_hw)
+ config_isadev(dvp, &bio_imask);
+ for (dvp = isa_devtab_net; dvp->id_driver; dvp++)
+ if (!dvp->id_driver->sensitive_hw)
+ config_isadev(dvp, &net_imask);
+ for (dvp = isa_devtab_null; dvp->id_driver; dvp++)
+ if (!dvp->id_driver->sensitive_hw)
+ config_isadev(dvp, (u_int *)NULL);
+
bio_imask |= SWI_CLOCK_MASK;
net_imask |= SWI_NET_MASK;
tty_imask |= SWI_TTY_MASK;
diff --git a/sys/i386/isa/isa_device.h b/sys/i386/isa/isa_device.h
index 5da5123d329d..509fe4371940 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.10 1994/09/03 16:03:09 csgr Exp $
+ * $Id: isa_device.h,v 1.11 1994/10/01 02:56:16 davidg Exp $
*/
#ifndef _I386_ISA_ISA_DEVICE_H_
@@ -89,6 +89,7 @@ struct isa_driver {
int (*attach) __P((struct isa_device *idp));
/* setup driver for a device */
char *name; /* device name */
+ int sensitive_hw; /* true if other probes confuse us */
};
extern char eintrnames[]; /* end of intrnames[] */
diff --git a/sys/i386/isa/syscons.c b/sys/i386/isa/syscons.c
index 6e7afea06093..35404eb1c292 100644
--- a/sys/i386/isa/syscons.c
+++ b/sys/i386/isa/syscons.c
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: syscons.c,v 1.65 1994/10/15 21:33:58 ache Exp $
+ * $Id: syscons.c,v 1.66 1994/10/17 12:44:02 ache Exp $
*/
#include "sc.h"
@@ -286,7 +286,7 @@ extern char *video_mode_ptr;
int color_display = -1;
struct isa_driver scdriver = {
- pcprobe, pcattach, "sc",
+ pcprobe, pcattach, "sc", 1
};
int
diff --git a/sys/isa/syscons.c b/sys/isa/syscons.c
index 6e7afea06093..35404eb1c292 100644
--- a/sys/isa/syscons.c
+++ b/sys/isa/syscons.c
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: syscons.c,v 1.65 1994/10/15 21:33:58 ache Exp $
+ * $Id: syscons.c,v 1.66 1994/10/17 12:44:02 ache Exp $
*/
#include "sc.h"
@@ -286,7 +286,7 @@ extern char *video_mode_ptr;
int color_display = -1;
struct isa_driver scdriver = {
- pcprobe, pcattach, "sc",
+ pcprobe, pcattach, "sc", 1
};
int