Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Aug 2013 19:30:50 +0000 (UTC)
From:      Ryan Stone <rstone@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r254100 - head/sys/kern
Message-ID:  <201308081930.r78JUo9e018341@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308081930.r78JUo9e018341>