Date: Mon, 29 Aug 2016 22:47:14 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305032 - head/sys/dev/cxgbe Message-ID: <201608292247.u7TMlEf3050457@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608292247.u7TMlEf3050457>