svn commit: r327654 - stable/11/sys/arm/broadcom/bcm2835
Ian Lepore
ian at FreeBSD.org
Sat Jan 6 23:12:34 UTC 2018
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);
/*
More information about the svn-src-all
mailing list