From owner-svn-src-head@freebsd.org Mon Aug 29 22:47:15 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53333B79A4B; Mon, 29 Aug 2016 22:47:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10A98F0C; Mon, 29 Aug 2016 22:47:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7TMlE1q050458; Mon, 29 Aug 2016 22:47:14 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7TMlEf3050457; Mon, 29 Aug 2016 22:47:14 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201608292247.u7TMlEf3050457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 29 Aug 2016 22:47:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305032 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2016 22:47:15 -0000 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); }