svn commit: r254100 - head/sys/kern

Ryan Stone rstone at FreeBSD.org
Thu Aug 8 19:30:50 UTC 2013


Author: rstone
Date: Thu Aug  8 19:30:49 2013
New Revision: 254100
URL: http://svnweb.freebsd.org/changeset/base/254100

Log:
  Allow drivers to return BUS_PROBE_NOWILDCARD from their attach routine to
  match devices where the driver class was fixed but the unit number was
  wildcarded.  This better matches the documented behaviour in
  DEVICE_PROBE(9).
  
  Reviewed by:	imp

Modified:
  head/sys/kern/subr_bus.c

Modified: head/sys/kern/subr_bus.c
==============================================================================
--- head/sys/kern/subr_bus.c	Thu Aug  8 18:40:19 2013	(r254099)
+++ head/sys/kern/subr_bus.c	Thu Aug  8 19:30:49 2013	(r254100)
@@ -2077,11 +2077,11 @@ device_probe_child(device_t dev, device_
 			if (best == NULL || result > pri) {
 				/*
 				 * Probes that return BUS_PROBE_NOWILDCARD
-				 * or lower only match when they are set
-				 * in stone by the parent bus.
+				 * or lower only match on devices whose
+				 * driver was explicitly specified.
 				 */
 				if (result <= BUS_PROBE_NOWILDCARD &&
-				    child->flags & DF_WILDCARD)
+				    !(child->flags & DF_FIXEDCLASS))
 					continue;
 				best = dl;
 				pri = result;


More information about the svn-src-head mailing list