Date: Sat, 2 Dec 2017 00:52:59 +0000 (UTC) From: "Landon J. Fuller" <landonf@FreeBSD.org> 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 Message-ID: <201712020052.vB20qxrf054980@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712020052.vB20qxrf054980>