From owner-svn-src-head@freebsd.org Thu May 26 00:44:17 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 CE99BB48405; Thu, 26 May 2016 00:44:17 +0000 (UTC) (envelope-from adrian@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 9FF0814C7; Thu, 26 May 2016 00:44:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4Q0iGOx069276; Thu, 26 May 2016 00:44:16 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4Q0iGcu069274; Thu, 26 May 2016 00:44:16 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201605260044.u4Q0iGcu069274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 26 May 2016 00:44:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300703 - head/sys/dev/bhnd/cores/chipc 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: Thu, 26 May 2016 00:44:17 -0000 Author: adrian Date: Thu May 26 00:44:16 2016 New Revision: 300703 URL: https://svnweb.freebsd.org/changeset/base/300703 Log: [bhnd] Fix release of uninitialized SPROM shadow in chipc detach. This was triggering a panic on detach; the SPROM shadow is now maintained by the bhnd_sprom_chipc driver, and should be removed from chipc. Submitted by: Landon Fuller Differential Revision: https://reviews.freebsd.org/D6548 Modified: head/sys/dev/bhnd/cores/chipc/chipc.c head/sys/dev/bhnd/cores/chipc/chipcvar.h Modified: head/sys/dev/bhnd/cores/chipc/chipc.c ============================================================================== --- head/sys/dev/bhnd/cores/chipc/chipc.c Thu May 26 00:43:08 2016 (r300702) +++ head/sys/dev/bhnd/cores/chipc/chipc.c Thu May 26 00:44:16 2016 (r300703) @@ -269,7 +269,6 @@ chipc_detach(device_t dev) chipc_release_region(sc, sc->core_region, RF_ALLOCATED|RF_ACTIVE); chipc_free_rman(sc); - bhnd_sprom_fini(&sc->sprom); CHIPC_LOCK_DESTROY(sc); Modified: head/sys/dev/bhnd/cores/chipc/chipcvar.h ============================================================================== --- head/sys/dev/bhnd/cores/chipc/chipcvar.h Thu May 26 00:43:08 2016 (r300702) +++ head/sys/dev/bhnd/cores/chipc/chipcvar.h Thu May 26 00:44:16 2016 (r300703) @@ -186,12 +186,8 @@ struct chipc_softc { bhnd_nvram_src_t nvram_src; /**< identified NVRAM source */ struct mtx mtx; /**< state mutex. */ - - struct bhnd_sprom sprom; /**< OTP/SPROM shadow, if any */ - size_t sprom_refcnt; /**< SPROM hardware refcount */ - + size_t sprom_refcnt; /**< SPROM pin enable refcount */ struct rman mem_rman; /**< port memory manager */ - STAILQ_HEAD(, chipc_region) mem_regions;/**< memory allocation records */ };