freebsd11_network: Call probe() before attach().
See inline comment. Fixes #14611.
This commit is contained in:
parent
daeb37ee4f
commit
c1e79d9431
@ -172,7 +172,10 @@ _fbsd_init_drivers(driver_t *drivers[])
|
|||||||
status = add_child_device(driver, root, &device);
|
status = add_child_device(driver, root, &device);
|
||||||
if (status != B_OK)
|
if (status != B_OK)
|
||||||
break;
|
break;
|
||||||
if (device_attach(device) == 0) {
|
// some drivers expect probe() to be called before attach()
|
||||||
|
// (i.e. they set driver softc in probe(), etc.)
|
||||||
|
if (device->methods.probe(device) >= 0
|
||||||
|
&& device_attach(device) == 0) {
|
||||||
dprintf("%s: init_driver(%p) at %d\n", gDriverName, driver, i);
|
dprintf("%s: init_driver(%p) at %d\n", gDriverName, driver, i);
|
||||||
status = init_root_device(&root);
|
status = init_root_device(&root);
|
||||||
if (status != B_OK)
|
if (status != B_OK)
|
||||||
|
Loading…
Reference in New Issue
Block a user