diff options
author | peter <peter@FreeBSD.org> | 2000-10-01 09:34:55 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2000-10-01 09:34:55 +0000 |
commit | 432c7cf945a1170f13136b4c0f5a7288cac1524e (patch) | |
tree | bf48001ee0c9416d19a5e8babe8485cc92aae85a /sys/i386 | |
parent | 7e501d290292b718afcb19ad5c255ee9f6aa92fc (diff) | |
download | FreeBSD-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/i386')
-rw-r--r-- | sys/i386/i386/legacy.c | 10 | ||||
-rw-r--r-- | sys/i386/i386/nexus.c | 10 |
2 files changed, 6 insertions, 14 deletions
diff --git a/sys/i386/i386/legacy.c b/sys/i386/i386/legacy.c index 32d6062..5271cbc 100644 --- a/sys/i386/i386/legacy.c +++ b/sys/i386/i386/legacy.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); diff --git a/sys/i386/i386/nexus.c b/sys/i386/i386/nexus.c index 32d6062..5271cbc 100644 --- a/sys/i386/i386/nexus.c +++ b/sys/i386/i386/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); |