diff options
| author | Vladimir Kondratyev <wulf@FreeBSD.org> | 2019-11-03 21:04:51 +0000 |
|---|---|---|
| committer | Vladimir Kondratyev <wulf@FreeBSD.org> | 2019-11-03 21:04:51 +0000 |
| commit | 7f6aee646a3efed440e8d0c2cc778bffd6a43d61 (patch) | |
| tree | 3a959683db8b2173eb0d7c319324b351a3f84d81 /sys/dev/ichiic | |
| parent | 7814f978e24129f9670c0ffb1c7819d6c46bf775 (diff) | |
Notes
Diffstat (limited to 'sys/dev/ichiic')
| -rw-r--r-- | sys/dev/ichiic/ig4_iic.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/ichiic/ig4_iic.c b/sys/dev/ichiic/ig4_iic.c index 13e1292bd9c94..e0be2a408610a 100644 --- a/sys/dev/ichiic/ig4_iic.c +++ b/sys/dev/ichiic/ig4_iic.c @@ -252,6 +252,14 @@ wait_status(ig4iic_softc_t *sc, uint32_t status) set_intr_mask(sc, 0); mtx_unlock(&sc->io_lock); count_us += 10000; + } else if ((status & IG4_STATUS_TX_EMPTY) && !DO_POLL(sc)) { + mtx_lock(&sc->io_lock); + set_intr_mask(sc, IG4_INTR_TX_EMPTY); + mtx_sleep(sc, &sc->io_lock, 0, "i2cwait", + (hz + 99) / 100); /* sleep up to 10ms */ + set_intr_mask(sc, 0); + mtx_unlock(&sc->io_lock); + count_us += 10000; } else { DELAY(25); count_us += 25; @@ -861,6 +869,7 @@ ig4iic_set_config(ig4iic_softc_t *sc) * See ig4_var.h for details on interrupt handler synchronization. */ reg_write(sc, IG4_REG_RX_TL, 0); + reg_write(sc, IG4_REG_TX_TL, 0); reg_write(sc, IG4_REG_CTL, IG4_CTL_MASTER | |
