On Fri, Jan 10, 2020 at 06:54:26PM -0600, Scott Cheloha wrote: > Ticks to milliseconds. > > ok?
Bump and rebase. 1/2 seconds, so, 500 milliseconds. ok? Index: dwiic.c =================================================================== RCS file: /cvs/src/sys/dev/ic/dwiic.c,v retrieving revision 1.10 diff -u -p -r1.10 dwiic.c --- dwiic.c 18 Feb 2020 12:13:39 -0000 1.10 +++ dwiic.c 20 Feb 2020 02:09:46 -0000 @@ -271,7 +271,8 @@ dwiic_i2c_exec(void *cookie, i2c_op_t op dwiic_read(sc, DW_IC_CLR_INTR); dwiic_write(sc, DW_IC_INTR_MASK, DW_IC_INTR_TX_EMPTY); - if (tsleep(&sc->sc_writewait, PRIBIO, "dwiic", hz / 2) != 0) + if (tsleep_nsec(&sc->sc_writewait, PRIBIO, "dwiic", + MSEC_TO_NSEC(500)) != 0) printf("%s: timed out waiting for tx_empty intr\n", sc->sc_dev.dv_xname); splx(s); @@ -368,8 +369,8 @@ dwiic_i2c_exec(void *cookie, i2c_op_t op dwiic_write(sc, DW_IC_INTR_MASK, DW_IC_INTR_RX_FULL); - if (tsleep(&sc->sc_readwait, PRIBIO, "dwiic", - hz / 2) != 0) + if (tsleep_nsec(&sc->sc_readwait, PRIBIO, "dwiic", + MSEC_TO_NSEC(500)) != 0) printf("%s: timed out waiting for " "rx_full intr\n", sc->sc_dev.dv_xname); @@ -433,8 +434,8 @@ dwiic_i2c_exec(void *cookie, i2c_op_t op while (sc->sc_busy) { dwiic_write(sc, DW_IC_INTR_MASK, DW_IC_INTR_STOP_DET); - if (tsleep(&sc->sc_busy, PRIBIO, "dwiic", - hz / 2) != 0) + if (tsleep_nsec(&sc->sc_busy, PRIBIO, "dwiic", + MSEC_TO_NSEC(500)) != 0) printf("%s: timed out waiting for " "stop intr\n", sc->sc_dev.dv_xname);