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
This commit is contained in:
parent
b74dd6c77b
commit
08a42caa50
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user