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
This commit is contained in:
parent
3ffcacc9d8
commit
2cf3496166
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user