svn commit: r183901 - head/sys/powerpc/ofw

Nathan Whitehorn nwhitehorn at FreeBSD.org
Wed Oct 15 03:38:03 UTC 2008


Author: nwhitehorn
Date: Wed Oct 15 03:38:03 2008
New Revision: 183901
URL: http://svn.freebsd.org/changeset/base/183901

Log:
  Prevent the OF syscons module from trying to attach to real devices on the
  nexus by only attaching to a device with no OF node.

Modified:
  head/sys/powerpc/ofw/ofw_syscons.c

Modified: head/sys/powerpc/ofw/ofw_syscons.c
==============================================================================
--- head/sys/powerpc/ofw/ofw_syscons.c	Wed Oct 15 00:54:57 2008	(r183900)
+++ head/sys/powerpc/ofw/ofw_syscons.c	Wed Oct 15 03:38:03 2008	(r183901)
@@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$");
 #include <dev/syscons/syscons.h>
 
 #include <dev/ofw/openfirm.h>
+#include <dev/ofw/ofw_bus.h>
 #include <dev/ofw/ofw_pci.h>
 #include <powerpc/ofw/ofw_syscons.h>
 
@@ -845,6 +846,10 @@ ofwfb_scidentify(driver_t *driver, devic
 static int
 ofwfb_scprobe(device_t dev)
 {
+	/* This is a fake device, so make sure there is no OF node for it */
+	if (ofw_bus_get_node(dev) != -1)
+		return ENXIO;
+	
 	device_set_desc(dev, "System console");
 	return (sc_probe_unit(device_get_unit(dev), 
 	    device_get_flags(dev) | SC_AUTODETECT_KBD));


More information about the svn-src-all mailing list