Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Jan 2018 23:12:32 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
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
Message-ID:  <201801062312.w06NCWY4009812@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 
 			/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801062312.w06NCWY4009812>