diff options
author | rstone <rstone@FreeBSD.org> | 2013-08-08 19:30:49 +0000 |
---|---|---|
committer | rstone <rstone@FreeBSD.org> | 2013-08-08 19:30:49 +0000 |
commit | d9719f74bcc2402e9eb0cd873ad60e6ce8c86c14 (patch) | |
tree | dd9fe1dd054c1339f173dabd80140468a13aca40 | |
parent | 4c7750d3a89a6915e36b36744198453b6ab9996e (diff) | |
download | FreeBSD-src-d9719f74bcc2402e9eb0cd873ad60e6ce8c86c14.zip FreeBSD-src-d9719f74bcc2402e9eb0cd873ad60e6ce8c86c14.tar.gz |
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
-rw-r--r-- | sys/kern/subr_bus.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 717ded4..b3b1852 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -2077,11 +2077,11 @@ device_probe_child(device_t dev, device_t child) 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; |