From owner-svn-src-all@FreeBSD.ORG Thu Aug 8 19:30:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8AE347E; Thu, 8 Aug 2013 19:30:50 +0000 (UTC) (envelope-from rstone@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 787A32DFB; Thu, 8 Aug 2013 19:30:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r78JUoxG018342; Thu, 8 Aug 2013 19:30:50 GMT (envelope-from rstone@svn.freebsd.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r78JUo9e018341; Thu, 8 Aug 2013 19:30:50 GMT (envelope-from rstone@svn.freebsd.org) Message-Id: <201308081930.r78JUo9e018341@svn.freebsd.org> From: Ryan Stone Date: Thu, 8 Aug 2013 19:30:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254100 - head/sys/kern 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: Thu, 08 Aug 2013 19:30:50 -0000 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;