Date: Sun, 26 Oct 2014 04:10:18 +0000 (UTC) From: Ian Lepore <ian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r273678 - stable/10/sys/dev/fdt Message-ID: <201410260410.s9Q4AIqU040143@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410260410.s9Q4AIqU040143>