summaryrefslogtreecommitdiffstats
path: root/sys/dev/fdt
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-10-26 04:10:17 +0000
committerian <ian@FreeBSD.org>2014-10-26 04:10:17 +0000
commitd16952c51d3ca6308289b1bb98e2c16fd3b135c7 (patch)
treea22c0a43a7c4cd1e983801c300a23a21b89cb03b /sys/dev/fdt
parent81b501396651d4489460cbb7198c5855b8bf0bee (diff)
downloadFreeBSD-src-d16952c51d3ca6308289b1bb98e2c16fd3b135c7.zip
FreeBSD-src-d16952c51d3ca6308289b1bb98e2c16fd3b135c7.tar.gz
MFC r273282: Fail to probe on simplebus nodes that lack a "ranges" property.
Diffstat (limited to 'sys/dev/fdt')
-rw-r--r--sys/dev/fdt/simplebus.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/fdt/simplebus.c b/sys/dev/fdt/simplebus.c
index 4159783..d432791 100644
--- a/sys/dev/fdt/simplebus.c
+++ b/sys/dev/fdt/simplebus.c
@@ -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);
OpenPOWER on IntegriCloud