device_manager: tune the search paths
* the Virtio RNG PCI device has the class 0, so can't be found using usual paths. Add 0 to _AlwaysRegisterDynamic() and "busses/virtio" in _GetNextDriverPath() for non generic drivers to help finding virtio_pci. * The RNG Virtio device is generic and needs "busses/random" to find virtio_rng.
This commit is contained in:
parent
f73fb1051d
commit
eb5639c43e
@ -1608,6 +1608,7 @@ device_node::_GetNextDriverPath(void*& cookie, KPath& _path)
|
||||
_AddPath(*stack, "busses/pci");
|
||||
_AddPath(*stack, "bus_managers");
|
||||
} else if (!generic) {
|
||||
_AddPath(*stack, "busses", "virtio");
|
||||
_AddPath(*stack, "drivers");
|
||||
} else {
|
||||
// For generic drivers, we only allow busses when the
|
||||
@ -1619,7 +1620,8 @@ device_node::_GetNextDriverPath(void*& cookie, KPath& _path)
|
||||
_AddPath(*stack, "busses");
|
||||
}
|
||||
_AddPath(*stack, "drivers", sGenericContextPath);
|
||||
_AddPath(*stack, "busses/scsi");
|
||||
_AddPath(*stack, "busses/scsi");
|
||||
_AddPath(*stack, "busses/random");
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1736,7 +1738,7 @@ device_node::_AlwaysRegisterDynamic()
|
||||
get_attr_uint16(this, B_DEVICE_TYPE, &type, false);
|
||||
get_attr_uint16(this, B_DEVICE_SUB_TYPE, &subType, false);
|
||||
|
||||
return type == PCI_serial_bus || type == PCI_bridge;
|
||||
return type == PCI_serial_bus || type == PCI_bridge || type == 0;
|
||||
// TODO: we may want to be a bit more specific in the future
|
||||
}
|
||||
|
||||
@ -2308,4 +2310,3 @@ device_manager_init_post_modules(struct kernel_args* args)
|
||||
RecursiveLocker _(sLock);
|
||||
return sRootNode->Reprobe();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user