svn commit: r300703 - head/sys/dev/bhnd/cores/chipc

Adrian Chadd adrian at FreeBSD.org
Thu May 26 00:44:17 UTC 2016


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 <landonf at landonf.org>
  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 */
 };
 


More information about the svn-src-head mailing list