aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/eisa
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1999-05-18 21:03:30 +0000
committerPeter Wemm <peter@FreeBSD.org>1999-05-18 21:03:30 +0000
commitab25d374b20b0f2d95e582f809da498a19d541a5 (patch)
treed3f469dd69769a4eb7801a0921701d18faae5f8e /sys/dev/eisa
parent8dc26439da0d68c4035e407368d5e775b266deb2 (diff)
downloadsrc-ab25d374b20b0f2d95e582f809da498a19d541a5.tar.gz
src-ab25d374b20b0f2d95e582f809da498a19d541a5.zip
Don't detect an EISA bus unless we see a "card" there somewhere. An EISA
motherboard will have a card for the "motherboard" on slot 0. eisa0: <EISA bus> on motherboard mainboard0: <ASU5101 (System Board)> at slot 0 on eisa0 This should stop the probe "detecting" an EISA bus everywhere that has a 'controller eisa0' line regardless of whether it's really there.
Notes
Notes: svn path=/head/; revision=47308
Diffstat (limited to 'sys/dev/eisa')
-rw-r--r--sys/dev/eisa/eisaconf.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/eisa/eisaconf.c b/sys/dev/eisa/eisaconf.c
index d6142e06418a..464ebcfe4cb8 100644
--- a/sys/dev/eisa/eisaconf.c
+++ b/sys/dev/eisa/eisaconf.c
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: eisaconf.c,v 1.42 1999/05/06 22:17:26 peter Exp $
+ * $Id: eisaconf.c,v 1.43 1999/05/08 21:59:20 dfr Exp $
*/
#include "opt_eisa.h"
@@ -149,6 +149,7 @@ eisa_probe(device_t dev)
struct eisa_device *e_dev;
int eisaBase = 0xc80;
eisa_id_t eisa_id;
+ int devices_found = 0;
device_set_desc(dev, "EISA bus");
@@ -162,6 +163,8 @@ eisa_probe(device_t dev)
if (eisa_id & 0x80000000)
continue; /* no EISA card in slot */
+ devices_found++;
+
/* Prepare an eisa_device_node for this slot */
e_dev = (struct eisa_device *)malloc(sizeof(*e_dev),
M_DEVBUF, M_NOWAIT);
@@ -183,7 +186,12 @@ eisa_probe(device_t dev)
device_add_child(dev, NULL, -1, e_dev);
}
- return 0;
+ /*
+ * EISA busses themselves are not easily detectable, the easiest way
+ * to tell if there is an eisa bus is if we found something - there
+ * should be a motherboard "card" there somewhere.
+ */
+ return devices_found ? 0 : ENXIO;
}
static void