svn commit: r318387 - head/sys/dev/cxgbe
John Baldwin
jhb at FreeBSD.org
Tue May 16 23:18:52 UTC 2017
Author: jhb
Date: Tue May 16 23:18:50 2017
New Revision: 318387
URL: https://svnweb.freebsd.org/changeset/base/318387
Log:
Add support for child devices that aren't ports.
Invoke any identify routines of child drivers during attach before attaching
children, and delete any remaining devices after deleting ports.
MFC after: 1 month
Sponsored by: Chelsio Communications
Modified:
head/sys/dev/cxgbe/t4_main.c
Modified: head/sys/dev/cxgbe/t4_main.c
==============================================================================
--- head/sys/dev/cxgbe/t4_main.c Tue May 16 23:15:40 2017 (r318386)
+++ head/sys/dev/cxgbe/t4_main.c Tue May 16 23:18:50 2017 (r318387)
@@ -1186,6 +1186,12 @@ t4_attach(device_t dev)
goto done;
}
+ rc = bus_generic_probe(dev);
+ if (rc != 0) {
+ device_printf(dev, "failed to probe child drivers: %d\n", rc);
+ goto done;
+ }
+
rc = bus_generic_attach(dev);
if (rc != 0) {
device_printf(dev,
@@ -1339,6 +1345,8 @@ t4_detach_common(device_t dev)
}
}
+ device_delete_children(dev);
+
if (sc->flags & FULL_INIT_DONE)
adapter_full_uninit(sc);
More information about the svn-src-head
mailing list