bhnd(4): Fix regression in BCM4331 SPROM pin reference counting.

In r304870, refcount handling was lifted out into a common OTP/SPROM code
path, but the refcount assertions in chipc_disable_sprom_pins() were not
updated accordingly; this triggered an assertion on BCM4331 devices when
releasing a SPROM pin reservation.

Approved by:	adrian (mentor, implicit)
This commit is contained in:
Landon J. Fuller 2016-09-17 22:18:32 +00:00
parent b0c554c3a5
commit 315cf4daba
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=305907

View File

@ -1261,8 +1261,7 @@ chipc_disable_sprom_pins(struct chipc_softc *sc)
return; return;
CHIPC_LOCK_ASSERT(sc, MA_OWNED); CHIPC_LOCK_ASSERT(sc, MA_OWNED);
KASSERT(sc->sprom_refcnt != 0, ("sprom pins already disabled")); KASSERT(sc->sprom_refcnt == 0, ("sprom pins in use"));
KASSERT(sc->sprom_refcnt == 1, ("sprom pins in use"));
cctrl = bhnd_bus_read_4(sc->core, CHIPC_CHIPCTRL); cctrl = bhnd_bus_read_4(sc->core, CHIPC_CHIPCTRL);