Date: Tue, 27 Mar 2018 20:49:47 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r331647 - in stable: 10/sys/dev/cxgbe 11/sys/dev/cxgbe Message-ID: <201803272049.w2RKnlVr063888@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Tue Mar 27 20:49:47 2018 New Revision: 331647 URL: https://svnweb.freebsd.org/changeset/base/331647 Log: MFC 318387: 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. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/cxgbe/t4_main.c Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Tue Mar 27 20:34:49 2018 (r331646) +++ stable/10/sys/dev/cxgbe/t4_main.c Tue Mar 27 20:49:47 2018 (r331647) @@ -1174,6 +1174,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, @@ -1265,6 +1271,8 @@ t4_detach_common(device_t dev) free(pi, M_CXGBE); } } + + device_delete_children(dev); if (sc->flags & FULL_INIT_DONE) adapter_full_uninit(sc);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803272049.w2RKnlVr063888>