svn commit: r305032 - head/sys/dev/cxgbe

John Baldwin jhb at FreeBSD.org
Mon Aug 29 22:47:15 UTC 2016


Author: jhb
Date: Mon Aug 29 22:47:14 2016
New Revision: 305032
URL: https://svnweb.freebsd.org/changeset/base/305032

Log:
  Use device_verbose() to undo device_quiet() when detaching from t[45]iovX.
  
  The device quiet flag is not automatically reset on detach, so it is
  inherited by other device drivers (e.g. when switching a device driver
  over to ppt for PCI pass through).  Cope with this behavior by explicitly
  marking the device verbose during detach so that the next driver can make
  its own decision.
  
  Sponsored by:	Chelsio Communications

Modified:
  head/sys/dev/cxgbe/t4_iov.c

Modified: head/sys/dev/cxgbe/t4_iov.c
==============================================================================
--- head/sys/dev/cxgbe/t4_iov.c	Mon Aug 29 22:38:18 2016	(r305031)
+++ head/sys/dev/cxgbe/t4_iov.c	Mon Aug 29 22:47:14 2016	(r305032)
@@ -209,10 +209,15 @@ static int
 t4iov_detach(device_t dev)
 {
 	struct t4iov_softc *sc;
+	int error;
 
 	sc = device_get_softc(dev);
-	if (sc->sc_attached)
-		return (t4iov_detach_child(dev));
+	if (sc->sc_attached) {
+		error = t4iov_detach_child(dev);
+		if (error)
+			return (error);
+	}
+	device_verbose(dev);
 	return (0);
 }
 


More information about the svn-src-all mailing list