summaryrefslogtreecommitdiffstats
path: root/sys/dev/eisa
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-05-18 21:03:30 +0000
committerpeter <peter@FreeBSD.org>1999-05-18 21:03:30 +0000
commitd446c6adb0181af0297e6e6c8fe8e92a770b0895 (patch)
tree7aafc633fa454ada1dfcb09629e8c7ad189ba083 /sys/dev/eisa
parent1f36ef3106131a350fb260cfb96c49a83a75d8e5 (diff)
downloadFreeBSD-src-d446c6adb0181af0297e6e6c8fe8e92a770b0895.zip
FreeBSD-src-d446c6adb0181af0297e6e6c8fe8e92a770b0895.tar.gz
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.
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 d6142e0..464ebcf 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
OpenPOWER on IntegriCloud