From owner-svn-src-all@freebsd.org Sat Sep 17 22:18:34 2016 Return-Path: Delivered-To: svn-src-all@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 25A4ABDF027; Sat, 17 Sep 2016 22:18:34 +0000 (UTC) (envelope-from landonf@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 DBA55C86; Sat, 17 Sep 2016 22:18:33 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8HMIX4M086012; Sat, 17 Sep 2016 22:18:33 GMT (envelope-from landonf@FreeBSD.org) Received: (from landonf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8HMIXIf086011; Sat, 17 Sep 2016 22:18:33 GMT (envelope-from landonf@FreeBSD.org) Message-Id: <201609172218.u8HMIXIf086011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: landonf set sender to landonf@FreeBSD.org using -f From: "Landon J. Fuller" Date: Sat, 17 Sep 2016 22:18:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305907 - 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Sep 2016 22:18:34 -0000 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);