Fail to probe on simplebus nodes that lack a "ranges" property.
Increasingly, FDT data has the "simple-bus" compatible string on nodes that have children, but we wouldn't consider them to be busses. If the node lacks a ranges property then we will fail to attach successfully, so fail to probe as well.
This commit is contained in:
parent
c5422af95f
commit
2a74fe2c96
@ -133,7 +133,13 @@ simplebus_probe(device_t dev)
|
||||
if (!ofw_bus_status_okay(dev))
|
||||
return (ENXIO);
|
||||
|
||||
if (!ofw_bus_is_compatible(dev, "simple-bus") &&
|
||||
/*
|
||||
* FDT data puts a "simple-bus" compatible string on many things that
|
||||
* have children but aren't really busses in our world. Without a
|
||||
* ranges property we will fail to attach, so just fail to probe too.
|
||||
*/
|
||||
if (!(ofw_bus_is_compatible(dev, "simple-bus") &&
|
||||
ofw_bus_has_prop(dev, "ranges")) &&
|
||||
(ofw_bus_get_type(dev) == NULL || strcmp(ofw_bus_get_type(dev),
|
||||
"soc") != 0))
|
||||
return (ENXIO);
|
||||
|
Loading…
Reference in New Issue
Block a user