Author: landonf
Date: Sat Sep 17 22:18:32 2016
New Revision: 305907
URL: https://svnweb.freebsd.org/changeset/base/305907

Log:
  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)

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 Sep 17 22:13:03 2016        
(r305906)
+++ head/sys/dev/bhnd/cores/chipc/chipc.c       Sat Sep 17 22:18:32 2016        
(r305907)
@@ -1261,8 +1261,7 @@ chipc_disable_sprom_pins(struct chipc_so
                return;
 
        CHIPC_LOCK_ASSERT(sc, MA_OWNED);
-       KASSERT(sc->sprom_refcnt != 0, ("sprom pins already disabled"));
-       KASSERT(sc->sprom_refcnt == 1, ("sprom pins in use"));
+       KASSERT(sc->sprom_refcnt == 0, ("sprom pins in use"));
 
        cctrl = bhnd_bus_read_4(sc->core, CHIPC_CHIPCTRL);
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to