Ticks to seconds.

ok?

Index: ic/rtsx.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/rtsx.c,v
retrieving revision 1.21
diff -u -p -r1.21 rtsx.c
--- ic/rtsx.c   9 Oct 2017 20:06:36 -0000       1.21
+++ ic/rtsx.c   7 Feb 2020 14:13:40 -0000
@@ -1008,7 +1008,7 @@ rtsx_xfer_exec(struct rtsx_softc *sc, bu
        splx(s);
 
        /* Wait for completion. */
-       return rtsx_wait_intr(sc, RTSX_TRANS_OK_INT, 10*hz);
+       return rtsx_wait_intr(sc, RTSX_TRANS_OK_INT, 10);
 }
 
 int
@@ -1315,7 +1315,7 @@ rtsx_exec_command(sdmmc_chipset_handle_t
        /* Run the command queue and wait for completion. */
        error = rtsx_hostcmd_send(sc, ncmd);
        if (error == 0)
-               error = rtsx_wait_intr(sc, RTSX_TRANS_OK_INT, hz);
+               error = rtsx_wait_intr(sc, RTSX_TRANS_OK_INT, 1);
        if (error)
                goto unload_cmdbuf;
 
@@ -1381,7 +1381,7 @@ rtsx_soft_reset(struct rtsx_softc *sc)
 }
 
 int
-rtsx_wait_intr(struct rtsx_softc *sc, int mask, int timo)
+rtsx_wait_intr(struct rtsx_softc *sc, int mask, int secs)
 {
        int status;
        int error = 0;
@@ -1392,8 +1392,8 @@ rtsx_wait_intr(struct rtsx_softc *sc, in
        s = splsdmmc();
        status = sc->intr_status & mask;
        while (status == 0) {
-               if (tsleep(&sc->intr_status, PRIBIO, "rtsxintr", timo)
-                   == EWOULDBLOCK) {
+               if (tsleep_nsec(&sc->intr_status, PRIBIO, "rtsxintr",
+                   SEC_TO_NSEC(secs)) == EWOULDBLOCK) {
                        rtsx_soft_reset(sc);
                        error = ETIMEDOUT;
                        break;

Reply via email to