From owner-svn-src-head@FreeBSD.ORG Sun Oct 19 18:31:12 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7555A907; Sun, 19 Oct 2014 18:31:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60D7D7C5; Sun, 19 Oct 2014 18:31:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9JIVCUb091020; Sun, 19 Oct 2014 18:31:12 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9JIVCk5091019; Sun, 19 Oct 2014 18:31:12 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201410191831.s9JIVCk5091019@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 19 Oct 2014 18:31:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273282 - head/sys/dev/fdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Oct 2014 18:31:12 -0000 Author: ian Date: Sun Oct 19 18:31:11 2014 New Revision: 273282 URL: https://svnweb.freebsd.org/changeset/base/273282 Log: 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. Modified: head/sys/dev/fdt/simplebus.c Modified: head/sys/dev/fdt/simplebus.c ============================================================================== --- head/sys/dev/fdt/simplebus.c Sun Oct 19 17:55:04 2014 (r273281) +++ head/sys/dev/fdt/simplebus.c Sun Oct 19 18:31:11 2014 (r273282) @@ -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);