svn commit: r223577 - projects/pseries/powerpc/ofw

Nathan Whitehorn nwhitehorn at FreeBSD.org
Sun Jun 26 18:44:01 UTC 2011


Author: nwhitehorn
Date: Sun Jun 26 18:44:00 2011
New Revision: 223577
URL: http://svn.freebsd.org/changeset/base/223577

Log:
  Add a tunable to control whether the entire PCI bus will be probed, or just
  those devices known to exist in the device tree. Some PCI controllers
  really, really don't like the operating system to cause config cycles to
  nonexistant devices.

Modified:
  projects/pseries/powerpc/ofw/ofw_pcibus.c

Modified: projects/pseries/powerpc/ofw/ofw_pcibus.c
==============================================================================
--- projects/pseries/powerpc/ofw/ofw_pcibus.c	Sun Jun 26 18:27:17 2011	(r223576)
+++ projects/pseries/powerpc/ofw/ofw_pcibus.c	Sun Jun 26 18:44:00 2011	(r223577)
@@ -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)
 {
@@ -136,7 +139,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));
 }


More information about the svn-src-projects mailing list