diff options
author | ian <ian@FreeBSD.org> | 2018-01-06 23:12:32 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2018-01-06 23:12:32 +0000 |
commit | 9e2177ff826b6c41b060876ede6a1a694d5b9a83 (patch) | |
tree | 22690355b64420af1e95a30494430fac7af520b6 /sys/arm/broadcom/bcm2835 | |
parent | 301cddf9f21137cd42fc9fe59efe94e100ab82f7 (diff) | |
download | FreeBSD-src-9e2177ff826b6c41b060876ede6a1a694d5b9a83.zip FreeBSD-src-9e2177ff826b6c41b060876ede6a1a694d5b9a83.tar.gz |
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.
Diffstat (limited to 'sys/arm/broadcom/bcm2835')
-rw-r--r-- | sys/arm/broadcom/bcm2835/bcm2835_bsc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arm/broadcom/bcm2835/bcm2835_bsc.c b/sys/arm/broadcom/bcm2835/bcm2835_bsc.c index 8308952..62c5c12 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_bsc.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_bsc.c @@ -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, uint32_t nmsgs) */ 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, uint32_t nmsgs) } } else { DEVICE_DEBUGF(sc, 1, "%-6s 0x%02x len %d: ", - (curisread) ? "readctl" : "write", curslave, + (curisread) ? "read" : "write", curslave, sc->sc_replen); /* |