From owner-svn-src-head@freebsd.org Sat Dec 2 00:53:01 2017 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 1D77FDEB9B2; Sat, 2 Dec 2017 00:53:01 +0000 (UTC) (envelope-from landonf@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 DBEE679D79; Sat, 2 Dec 2017 00:53:00 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB20qx1u054981; Sat, 2 Dec 2017 00:52:59 GMT (envelope-from landonf@FreeBSD.org) Received: (from landonf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB20qxrf054980; Sat, 2 Dec 2017 00:52:59 GMT (envelope-from landonf@FreeBSD.org) Message-Id: <201712020052.vB20qxrf054980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: landonf set sender to landonf@FreeBSD.org using -f From: "Landon J. Fuller" Date: Sat, 2 Dec 2017 00:52:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326450 - head/sys/dev/bhnd/cores/chipc X-SVN-Group: head X-SVN-Commit-Author: landonf X-SVN-Commit-Paths: head/sys/dev/bhnd/cores/chipc X-SVN-Commit-Revision: 326450 X-SVN-Commit-Repository: base 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.25 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: Sat, 02 Dec 2017 00:53:01 -0000 Author: landonf Date: Sat Dec 2 00:52:59 2017 New Revision: 326450 URL: https://svnweb.freebsd.org/changeset/base/326450 Log: bhnd_chipc(4): Break cyclic references to the ChipCommon device bhnd_chipc's children may hold strong provider references to their parent; we must detach any children before attempting to deregister the bhnd_chipc device as a bus service provider. Approved by: adrian (mentor, implicit) Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/bhnd/cores/chipc/chipc.c Modified: head/sys/dev/bhnd/cores/chipc/chipc.c ============================================================================== --- head/sys/dev/bhnd/cores/chipc/chipc.c Sat Dec 2 00:09:58 2017 (r326449) +++ head/sys/dev/bhnd/cores/chipc/chipc.c Sat Dec 2 00:52:59 2017 (r326450) @@ -245,10 +245,10 @@ chipc_detach(device_t dev) sc = device_get_softc(dev); - if ((error = bhnd_deregister_provider(dev, BHND_SERVICE_ANY))) + if ((error = bus_generic_detach(dev))) return (error); - if ((error = bus_generic_detach(dev))) + if ((error = bhnd_deregister_provider(dev, BHND_SERVICE_ANY))) return (error); chipc_release_region(sc, sc->core_region, RF_ALLOCATED|RF_ACTIVE);