From owner-svn-src-all@FreeBSD.ORG Mon Sep 16 15:10:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3C475E56; Mon, 16 Sep 2013 15:10:12 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) 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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 29A95249B; Mon, 16 Sep 2013 15:10:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8GFABDK024781; Mon, 16 Sep 2013 15:10:12 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8GFABav024780; Mon, 16 Sep 2013 15:10:11 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201309161510.r8GFABav024780@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 16 Sep 2013 15:10:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255615 - head/sys/powerpc/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 15:10:12 -0000 Author: nwhitehorn Date: Mon Sep 16 15:10:11 2013 New Revision: 255615 URL: http://svnweb.freebsd.org/changeset/base/255615 Log: Add a loader tunable to use only device tree-provided PCI devices. This is needed on some more fragile systems to avoid machine checks when blindly probing the PCI bus. Also reduce ofw_pcibus's priority slightly so that it can be overridden. Approved by: re (gjb) Modified: head/sys/powerpc/ofw/ofw_pcibus.c Modified: head/sys/powerpc/ofw/ofw_pcibus.c ============================================================================== --- head/sys/powerpc/ofw/ofw_pcibus.c Mon Sep 16 14:32:56 2013 (r255614) +++ head/sys/powerpc/ofw/ofw_pcibus.c Mon Sep 16 15:10:11 2013 (r255615) @@ -101,6 +101,9 @@ DRIVER_MODULE(ofw_pcibus, pcib, ofw_pcib MODULE_VERSION(ofw_pcibus, 1); MODULE_DEPEND(ofw_pcibus, pci, 1, 1, 1); +static int ofw_devices_only = 0; +TUNABLE_INT("hw.pci.ofw_devices_only", &ofw_devices_only); + static int ofw_pcibus_probe(device_t dev) { @@ -109,7 +112,7 @@ ofw_pcibus_probe(device_t dev) return (ENXIO); device_set_desc(dev, "OFW PCI bus"); - return (0); + return (BUS_PROBE_DEFAULT); } static int @@ -137,7 +140,8 @@ ofw_pcibus_attach(device_t dev) * functions on multi-function cards. */ - ofw_pcibus_enum_bus(dev, domain, busno); + if (!ofw_devices_only) + ofw_pcibus_enum_bus(dev, domain, busno); return (bus_generic_attach(dev)); }