svn commit: r273678 - stable/10/sys/dev/fdt

Ian Lepore ian at FreeBSD.org
Sun Oct 26 04:10:18 UTC 2014


Author: ian
Date: Sun Oct 26 04:10:17 2014
New Revision: 273678
URL: https://svnweb.freebsd.org/changeset/base/273678

Log:
  MFC r273282:  Fail to probe on simplebus nodes that lack a "ranges" property.

Modified:
  stable/10/sys/dev/fdt/simplebus.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/fdt/simplebus.c
==============================================================================
--- stable/10/sys/dev/fdt/simplebus.c	Sun Oct 26 04:08:34 2014	(r273677)
+++ stable/10/sys/dev/fdt/simplebus.c	Sun Oct 26 04:10:17 2014	(r273678)
@@ -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);


More information about the svn-src-all mailing list