Skip site navigation (1)Skip section navigation (2)
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-11@freebsd.org
Subject:   svn commit: r331647 - in stable: 10/sys/dev/cxgbe 11/sys/dev/cxgbe
Message-ID:  <201803272049.w2RKnlnS063894@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/11/sys/dev/cxgbe/t4_main.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/dev/cxgbe/t4_main.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/11/sys/dev/cxgbe/t4_main.c
==============================================================================
--- stable/11/sys/dev/cxgbe/t4_main.c	Tue Mar 27 20:34:49 2018	(r331646)
+++ stable/11/sys/dev/cxgbe/t4_main.c	Tue Mar 27 20:49:47 2018	(r331647)
@@ -1179,6 +1179,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;
+	}
+
 	/*
 	 * Ensure thread-safe mailbox access (in debug builds).
 	 *
@@ -1341,6 +1347,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.w2RKnlnS063894>