summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/nexus.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2000-10-01 09:34:55 +0000
committerpeter <peter@FreeBSD.org>2000-10-01 09:34:55 +0000
commit432c7cf945a1170f13136b4c0f5a7288cac1524e (patch)
treebf48001ee0c9416d19a5e8babe8485cc92aae85a /sys/amd64/amd64/nexus.c
parent7e501d290292b718afcb19ad5c255ee9f6aa92fc (diff)
downloadFreeBSD-src-432c7cf945a1170f13136b4c0f5a7288cac1524e.zip
FreeBSD-src-432c7cf945a1170f13136b4c0f5a7288cac1524e.tar.gz
Fix the no-pci case of attaching isa, eisa and mca devices.
device_add_child() is meant to be called by the bus add_child method, not to replace the bus add_child method. We could have called nexus_add_device directly too, that would have also worked. PR: 21657 Tested by: markm
Diffstat (limited to 'sys/amd64/amd64/nexus.c')
-rw-r--r--sys/amd64/amd64/nexus.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/amd64/amd64/nexus.c b/sys/amd64/amd64/nexus.c
index 32d6062..5271cbc 100644
--- a/sys/amd64/amd64/nexus.c
+++ b/sys/amd64/amd64/nexus.c
@@ -40,8 +40,6 @@
* and I/O memory address space.
*/
-#include "mca.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
@@ -245,21 +243,19 @@ nexus_attach(device_t dev)
* connection points now so they show up "on motherboard".
*/
if (!devclass_get_device(devclass_find("eisa"), 0)) {
- child = device_add_child(dev, "eisa", 0);
+ child = BUS_ADD_CHILD(dev, 0, "eisa", 0);
if (child == NULL)
panic("nexus_attach eisa");
device_probe_and_attach(child);
}
-#if NMCA > 0
if (!devclass_get_device(devclass_find("mca"), 0)) {
- child = device_add_child(dev, "mca", 0);
+ child = BUS_ADD_CHILD(dev, 0, "mca", 0);
if (child == 0)
panic("nexus_probe mca");
device_probe_and_attach(child);
}
-#endif
if (!devclass_get_device(devclass_find("isa"), 0)) {
- child = device_add_child(dev, "isa", 0);
+ child = BUS_ADD_CHILD(dev, 0, "isa", 0);
if (child == NULL)
panic("nexus_attach isa");
device_probe_and_attach(child);
OpenPOWER on IntegriCloud