1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

[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 <landonf@landonf.org>
Differential Revision:	https://reviews.freebsd.org/D6548
This commit is contained in:
Adrian Chadd 2016-05-26 00:44:16 +00:00
parent 785df0cb3f
commit 72ebcd5db5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=300703
2 changed files with 1 additions and 6 deletions

View File

@ -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);

View File

@ -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 */
};