Set flags for devices before probing them. In the non-ISA case, flags set
via hints were not getting passed to the child. PR: kern/72489 MFC after: 1 day
This commit is contained in:
parent
1acd87a81f
commit
6f857c4b9f
@ -2074,7 +2074,7 @@ int
|
||||
device_set_devclass(device_t dev, const char *classname)
|
||||
{
|
||||
devclass_t dc;
|
||||
int error;
|
||||
int error, flags;
|
||||
|
||||
if (!classname) {
|
||||
if (dev->devclass)
|
||||
@ -2093,6 +2093,10 @@ device_set_devclass(device_t dev, const char *classname)
|
||||
|
||||
error = devclass_add_device(dc, dev);
|
||||
|
||||
/* Fetch any hints for the device before it is probed. */
|
||||
if (resource_int_value(classname, dev->unit, "flags", &flags) == 0)
|
||||
dev->devflags = flags;
|
||||
|
||||
bus_data_generation_update();
|
||||
return (error);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user