From owner-svn-src-stable@freebsd.org Sat Jan 6 23:12:34 2018 Return-Path: Delivered-To: svn-src-stable@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 00BDADF8CE3; Sat, 6 Jan 2018 23:12:34 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CE89363515; Sat, 6 Jan 2018 23:12:33 +0000 (UTC) (envelope-from ian@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E6D5F18F0E; Sat, 6 Jan 2018 23:12:32 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06NCWIj009813; Sat, 6 Jan 2018 23:12:32 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06NCWY4009812; Sat, 6 Jan 2018 23:12:32 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201801062312.w06NCWY4009812@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 6 Jan 2018 23:12:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327654 - stable/11/sys/arm/broadcom/bcm2835 X-SVN-Group: stable-11 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: stable/11/sys/arm/broadcom/bcm2835 X-SVN-Commit-Revision: 327654 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 23:12:34 -0000 Author: ian Date: Sat Jan 6 23:12:32 2018 New Revision: 327654 URL: https://svnweb.freebsd.org/changeset/base/327654 Log: MFC r326924-r326925 r326924: Fix debugging output, fallout from something like s/read/readctl/g while renaming variables in a previous change. r326925: Do not attempt to refill the TX fifo if there is no data left to transfer. A comment in bcm_bsc_fill_tx_fifo() even lists sc_totlen > 0 as a precondition for calling the routine. I apparently forgot to make the code do what my comment said. Modified: stable/11/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/broadcom/bcm2835/bcm2835_bsc.c ============================================================================== --- stable/11/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Sat Jan 6 23:04:14 2018 (r327653) +++ stable/11/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Sat Jan 6 23:12:32 2018 (r327654) @@ -505,7 +505,7 @@ bcm_bsc_intr(void *arg) * transfer is complete; TXD will be asserted along with ERR or * DONE if there is room in the fifo. */ - if (status & BCM_BSC_STATUS_TXD) + if ((status & BCM_BSC_STATUS_TXD) && sc->sc_totlen > 0) bcm_bsc_fill_tx_fifo(sc); } @@ -607,7 +607,7 @@ bcm_bsc_transfer(device_t dev, struct iic_msg *msgs, u */ if (sc->sc_replen == 0) { DEVICE_DEBUGF(sc, 1, "%-6s 0x%02x len %d: ", - (curisread) ? "readctl" : "write", curslave, + (curisread) ? "read" : "write", curslave, sc->sc_totlen); curlen = sc->sc_totlen; if (curisread) { @@ -619,7 +619,7 @@ bcm_bsc_transfer(device_t dev, struct iic_msg *msgs, u } } else { DEVICE_DEBUGF(sc, 1, "%-6s 0x%02x len %d: ", - (curisread) ? "readctl" : "write", curslave, + (curisread) ? "read" : "write", curslave, sc->sc_replen); /*