On Mon, Dec 30, 2019 at 05:06:53PM +0100, Martin Pieuchot wrote:
> Convert the remaining infinite sleeps that my grep-foo found to
> {t,m}sleep_nsec(9), ok?
OK bluhm@
> Index: dev/hotplug.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/hotplug.c,v
> retrieving revision 1.16
> diff -u -p -r1.16 hotplug.c
> --- dev/hotplug.c 7 Jun 2016 01:31:54 -0000 1.16
> +++ dev/hotplug.c 30 Dec 2019 15:49:36 -0000
> @@ -154,7 +154,7 @@ again:
> if (flags & IO_NDELAY)
> return (EAGAIN);
>
> - error = tsleep(&evqueue, PRIBIO | PCATCH, "htplev", 0);
> + error = tsleep_nsec(&evqueue, PRIBIO | PCATCH, "htplev", INFSLP);
> if (error)
> return (error);
> goto again;
> Index: dev/ipmi.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/ipmi.c,v
> retrieving revision 1.106
> diff -u -p -r1.106 ipmi.c
> --- dev/ipmi.c 19 Dec 2019 09:01:50 -0000 1.106
> +++ dev/ipmi.c 30 Dec 2019 15:49:48 -0000
> @@ -958,7 +958,7 @@ ipmi_cmd_wait(struct ipmi_cmd *c)
> res = task_add(c->c_sc->sc_cmd_taskq, &t);
> KASSERT(res == 1);
>
> - tsleep(c, PWAIT, "ipmicmd", 0);
> + tsleep_nsec(c, PWAIT, "ipmicmd", INFSLP);
>
> res = task_del(c->c_sc->sc_cmd_taskq, &t);
> KASSERT(res == 0);
> Index: dev/vscsi.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/vscsi.c,v
> retrieving revision 1.42
> diff -u -p -r1.42 vscsi.c
> --- dev/vscsi.c 19 Dec 2019 12:04:38 -0000 1.42
> +++ dev/vscsi.c 30 Dec 2019 15:50:08 -0000
> @@ -199,7 +199,8 @@ vscsi_cmd(struct scsi_xfer *xs)
> if (polled) {
> mtx_enter(&sc->sc_poll_mtx);
> while (ccb->ccb_xs != NULL)
> - msleep(ccb, &sc->sc_poll_mtx, PRIBIO, "vscsipoll", 0);
> + msleep_nsec(ccb, &sc->sc_poll_mtx, PRIBIO, "vscsipoll",
> + INFSLP);
> mtx_leave(&sc->sc_poll_mtx);
> scsi_done(xs);
> }
> Index: dev/acpi/acpi.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/acpi/acpi.c,v
> retrieving revision 1.374
> diff -u -p -r1.374 acpi.c
> --- dev/acpi/acpi.c 7 Sep 2019 13:46:20 -0000 1.374
> +++ dev/acpi/acpi.c 30 Dec 2019 15:50:21 -0000
> @@ -2867,7 +2867,7 @@ acpi_thread(void *arg)
> while (sc->sc_threadwaiting) {
> dnprintf(10, "acpi thread going to sleep...\n");
> rw_exit_write(&sc->sc_lck);
> - tsleep(sc, PWAIT, "acpi0", 0);
> + tsleep_nsec(sc, PWAIT, "acpi0", INFSLP);
> rw_enter_write(&sc->sc_lck);
> }
> sc->sc_threadwaiting = 1;
> Index: dev/hil/hil.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/hil/hil.c,v
> retrieving revision 1.27
> diff -u -p -r1.27 hil.c
> --- dev/hil/hil.c 30 Dec 2017 20:46:59 -0000 1.27
> +++ dev/hil/hil.c 30 Dec 2019 15:50:40 -0000
> @@ -450,7 +450,8 @@ hil_thread(void *arg)
> s = splhil();
> if (sc->sc_pending == 0) {
> splx(s);
> - (void)tsleep(&sc->sc_pending, PWAIT, "hil_event", 0);
> + tsleep_nsec(&sc->sc_pending, PWAIT, "hil_event",
> + INFSLP);
> continue;
> }
>
> Index: dev/ic/ami.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/ic/ami.c,v
> retrieving revision 1.234
> diff -u -p -r1.234 ami.c
> --- dev/ic/ami.c 14 Aug 2018 05:22:21 -0000 1.234
> +++ dev/ic/ami.c 30 Dec 2019 15:51:05 -0000
> @@ -1652,7 +1652,7 @@ ami_drv_pt(struct ami_softc *sc, u_int8_
> ami_start(sc, ccb);
>
> while (ccb->ccb_state != AMI_CCB_READY)
> - tsleep(ccb, PRIBIO, "ami_drv_pt", 0);
> + tsleep_nsec(ccb, PRIBIO, "ami_drv_pt", INFSLP);
>
> bus_dmamap_sync(sc->sc_dmat, ccb->ccb_dmamap, 0,
> ccb->ccb_dmamap->dm_mapsize, BUS_DMASYNC_POSTREAD);
> @@ -1804,7 +1804,8 @@ ami_mgmt(struct ami_softc *sc, u_int8_t
> ami_start(sc, ccb);
> mtx_enter(&sc->sc_cmd_mtx);
> while (ccb->ccb_state != AMI_CCB_READY)
> - msleep(ccb, &sc->sc_cmd_mtx, PRIBIO,"ami_mgmt", 0);
> + msleep_nsec(ccb, &sc->sc_cmd_mtx, PRIBIO,"ami_mgmt",
> + INFSLP);
> mtx_leave(&sc->sc_cmd_mtx);
> } else {
> /* change state must be run with id 0xfe and MUST be polled */
> Index: dev/ic/i82365.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/ic/i82365.c,v
> retrieving revision 1.36
> diff -u -p -r1.36 i82365.c
> --- dev/ic/i82365.c 8 Sep 2017 05:36:52 -0000 1.36
> +++ dev/ic/i82365.c 30 Dec 2019 15:51:40 -0000
> @@ -424,7 +424,7 @@ pcic_event_thread(arg)
> s = splhigh();
> if ((pe = SIMPLEQ_FIRST(&h->events)) == NULL) {
> splx(s);
> - (void) tsleep(&h->events, PWAIT, "pcicev", 0);
> + tsleep_nsec(&h->events, PWAIT, "pcicev", INFSLP);
> continue;
> } else {
> splx(s);
> Index: dev/ic/if_wi.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/ic/if_wi.c,v
> retrieving revision 1.170
> diff -u -p -r1.170 if_wi.c
> --- dev/ic/if_wi.c 7 Nov 2019 12:56:34 -0000 1.170
> +++ dev/ic/if_wi.c 30 Dec 2019 15:51:48 -0000
> @@ -1542,7 +1542,7 @@ wi_ioctl(struct ifnet *ifp, u_long comma
> * process is tsleep'ing in it.
> */
> while ((sc->wi_flags & WI_FLAGS_BUSY) && error == 0)
> - error = tsleep(&sc->wi_flags, PCATCH, "wiioc", 0);
> + error = tsleep_nsec(&sc->wi_flags, PCATCH, "wiioc", INFSLP);
> if (error != 0) {
> splx(s);
> return error;
> Index: dev/ic/mfi.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/ic/mfi.c,v
> retrieving revision 1.170
> diff -u -p -r1.170 mfi.c
> --- dev/ic/mfi.c 5 Mar 2019 01:40:20 -0000 1.170
> +++ dev/ic/mfi.c 30 Dec 2019 15:52:39 -0000
> @@ -958,7 +958,7 @@ mfi_exec(struct mfi_softc *sc, struct mf
>
> mtx_enter(&m);
> while (ccb->ccb_cookie != NULL)
> - msleep(ccb, &m, PRIBIO, "mfiexec", 0);
> + msleep_nsec(ccb, &m, PRIBIO, "mfiexec", INFSLP);
> mtx_leave(&m);
> }
>
> Index: dev/ic/mpi.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/ic/mpi.c,v
> retrieving revision 1.207
> diff -u -p -r1.207 mpi.c
> --- dev/ic/mpi.c 14 Nov 2019 21:13:58 -0000 1.207
> +++ dev/ic/mpi.c 30 Dec 2019 15:52:08 -0000
> @@ -1281,7 +1281,7 @@ mpi_wait(struct mpi_softc *sc, struct mp
>
> mtx_enter(&cookie);
> while (ccb->ccb_cookie != NULL)
> - msleep(ccb, &cookie, PRIBIO, "mpiwait", 0);
> + msleep_nsec(ccb, &cookie, PRIBIO, "mpiwait", INFSLP);
> mtx_leave(&cookie);
>
> done(ccb);
> Index: dev/ic/pgt.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/ic/pgt.c,v
> retrieving revision 1.95
> diff -u -p -r1.95 pgt.c
> --- dev/ic/pgt.c 12 Sep 2019 12:55:07 -0000 1.95
> +++ dev/ic/pgt.c 30 Dec 2019 15:51:59 -0000
> @@ -1128,7 +1128,7 @@ pgt_per_device_kthread(void *argp)
> while (!sck->sck_exit) {
> if (!sck->sck_update && !sck->sck_reset &&
> TAILQ_EMPTY(&sck->sck_traps))
> - tsleep(&sc->sc_kthread, 0, "pgtkth", 0);
> + tsleep_nsec(&sc->sc_kthread, 0, "pgtkth", INFSLP);
> if (sck->sck_reset) {
> DPRINTF(("%s: [thread] async reset\n",
> sc->sc_dev.dv_xname));
> Index: dev/ic/qlw.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/ic/qlw.c,v
> retrieving revision 1.31
> diff -u -p -r1.31 qlw.c
> --- dev/ic/qlw.c 24 Jan 2017 02:28:17 -0000 1.31
> +++ dev/ic/qlw.c 30 Dec 2019 15:52:54 -0000
> @@ -1025,7 +1025,7 @@ qlw_mbox(struct qlw_softc *sc, int maski
> }
> }
> } else {
> - tsleep(sc->sc_mbox, PRIBIO, "qlw_mbox", 0);
> + tsleep_nsec(sc->sc_mbox, PRIBIO, "qlw_mbox", INFSLP);
> result = sc->sc_mbox[0];
> }
>
> Index: dev/ic/rtwn.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/ic/rtwn.c,v
> retrieving revision 1.47
> diff -u -p -r1.47 rtwn.c
> --- dev/ic/rtwn.c 16 Nov 2019 14:08:31 -0000 1.47
> +++ dev/ic/rtwn.c 30 Dec 2019 15:51:30 -0000
> @@ -1560,7 +1560,7 @@ rtwn_ioctl(struct ifnet *ifp, u_long cmd
> * process is tsleep'ing in it.
> */
> while ((sc->sc_flags & RTWN_FLAG_BUSY) && error == 0)
> - error = tsleep(&sc->sc_flags, PCATCH, "rtwnioc", 0);
> + error = tsleep_nsec(&sc->sc_flags, PCATCH, "rtwnioc", INFSLP);
> if (error != 0) {
> splx(s);
> return error;
> @@ -3231,7 +3231,7 @@ rtwn_init_task(void *arg1)
>
> s = splnet();
> while (sc->sc_flags & RTWN_FLAG_BUSY)
> - tsleep(&sc->sc_flags, 0, "rtwnpwr", 0);
> + tsleep_nsec(&sc->sc_flags, 0, "rtwnpwr", INFSLP);
> sc->sc_flags |= RTWN_FLAG_BUSY;
>
> rtwn_stop(ifp);
> Index: dev/ic/tcic2.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/ic/tcic2.c,v
> retrieving revision 1.12
> diff -u -p -r1.12 tcic2.c
> --- dev/ic/tcic2.c 8 Sep 2017 05:36:52 -0000 1.12
> +++ dev/ic/tcic2.c 30 Dec 2019 15:53:11 -0000
> @@ -477,7 +477,7 @@ tcic_event_thread(arg)
> s = splhigh();
> if ((pe = SIMPLEQ_FIRST(&h->events)) == NULL) {
> splx(s);
> - (void) tsleep(&h->events, PWAIT, "tcicev", 0);
> + tsleep_nsec(&h->events, PWAIT, "tcicev", INFSLP);
> continue;
> }
> SIMPLEQ_REMOVE_HEAD(&h->events, pe_q);
> Index: dev/ic/twe.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/ic/twe.c,v
> retrieving revision 1.46
> diff -u -p -r1.46 twe.c
> --- dev/ic/twe.c 22 Jan 2016 00:40:25 -0000 1.46
> +++ dev/ic/twe.c 30 Dec 2019 15:53:19 -0000
> @@ -487,7 +487,7 @@ twe_thread(v)
>
> TWE_UNLOCK(sc, lock);
> sc->sc_thread_on = 1;
> - tsleep(sc, PWAIT, "twespank", 0);
> + tsleep_nsec(sc, PWAIT, "twespank", INFSLP);
> }
> }
>
> Index: dev/ic/wdc.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/ic/wdc.c,v
> retrieving revision 1.135
> diff -u -p -r1.135 wdc.c
> --- dev/ic/wdc.c 3 Jul 2019 00:08:18 -0000 1.135
> +++ dev/ic/wdc.c 30 Dec 2019 15:51:15 -0000
> @@ -1650,7 +1650,7 @@ wdc_exec_command(struct ata_drive_datas
> DEBUG_FUNCS);
>
> while ((wdc_c->flags & AT_DONE) == 0) {
> - tsleep(wdc_c, PRIBIO, "wdccmd", 0);
> + tsleep_nsec(wdc_c, PRIBIO, "wdccmd", INFSLP);
> }
> ret = WDC_COMPLETE;
> } else {
> Index: dev/isa/pcppi.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/isa/pcppi.c,v
> retrieving revision 1.14
> diff -u -p -r1.14 pcppi.c
> --- dev/isa/pcppi.c 20 Feb 2019 07:00:31 -0000 1.14
> +++ dev/isa/pcppi.c 30 Dec 2019 15:53:53 -0000
> @@ -243,7 +243,8 @@ pcppi_bell(self, pitch, period, slp)
> timeout_add(&sc->sc_bell_timeout, period);
> if (slp & PCPPI_BELL_SLEEP) {
> sc->sc_slp = 1;
> - tsleep(pcppi_bell_stop, PCPPIPRI | PCATCH, "bell", 0);
> + tsleep_nsec(pcppi_bell_stop, PCPPIPRI | PCATCH, "bell",
> + INFSLP);
> sc->sc_slp = 0;
> }
> }
> Index: dev/isa/sbdsp.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/isa/sbdsp.c,v
> retrieving revision 1.37
> diff -u -p -r1.37 sbdsp.c
> --- dev/isa/sbdsp.c 14 Sep 2016 06:12:19 -0000 1.37
> +++ dev/isa/sbdsp.c 30 Dec 2019 15:53:31 -0000
> @@ -936,7 +936,7 @@ sbdsp_pause(sc)
> struct sbdsp_softc *sc;
> {
> timeout_add_msec(&sc->sc_tmo, 125); /* 8x per second */
> - (void)tsleep(sbdsp_to, PWAIT, "sbpause", 0);
> + tsleep_nsec(sbdsp_to, PWAIT, "sbpause", INFSLP);
> }
>
> /*
> Index: dev/isa/wds.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/isa/wds.c,v
> retrieving revision 1.43
> diff -u -p -r1.43 wds.c
> --- dev/isa/wds.c 8 Sep 2017 05:36:52 -0000 1.43
> +++ dev/isa/wds.c 30 Dec 2019 15:53:40 -0000
> @@ -503,7 +503,7 @@ wds_get_buf(struct wds_softc *sc, int fl
> }
> if ((flags & SCSI_NOSLEEP) != 0)
> goto out;
> - tsleep(&wds_free_buffer, PRIBIO, "wdsbuf", 0);
> + tsleep_nsec(&wds_free_buffer, PRIBIO, "wdsbuf", INFSLP);
> }
>
> buf->busy = 1;
> Index: dev/pci/if_wi_pci.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pci/if_wi_pci.c,v
> retrieving revision 1.53
> diff -u -p -r1.53 if_wi_pci.c
> --- dev/pci/if_wi_pci.c 25 Jan 2019 00:19:26 -0000 1.53
> +++ dev/pci/if_wi_pci.c 30 Dec 2019 15:54:09 -0000
> @@ -177,7 +177,7 @@ wi_pci_wakeup(struct wi_softc *sc)
>
> s = splnet();
> while (sc->wi_flags & WI_FLAGS_BUSY)
> - tsleep(&sc->wi_flags, 0, "wipwr", 0);
> + tsleep_nsec(&sc->wi_flags, 0, "wipwr", INFSLP);
> sc->wi_flags |= WI_FLAGS_BUSY;
>
> wi_init(sc);
> Index: dev/pci/mfii.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pci/mfii.c,v
> retrieving revision 1.63
> diff -u -p -r1.63 mfii.c
> --- dev/pci/mfii.c 9 Sep 2019 09:38:04 -0000 1.63
> +++ dev/pci/mfii.c 30 Dec 2019 15:54:17 -0000
> @@ -1713,7 +1713,7 @@ mfii_exec(struct mfii_softc *sc, struct
>
> mtx_enter(&m);
> while (ccb->ccb_cookie != NULL)
> - msleep(ccb, &m, PRIBIO, "mfiiexec", 0);
> + msleep_nsec(ccb, &m, PRIBIO, "mfiiexec", INFSLP);
> mtx_leave(&m);
>
> return (0);
> Index: dev/pci/mpii.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pci/mpii.c,v
> retrieving revision 1.123
> diff -u -p -r1.123 mpii.c
> --- dev/pci/mpii.c 29 Dec 2019 21:30:21 -0000 1.123
> +++ dev/pci/mpii.c 30 Dec 2019 15:54:41 -0000
> @@ -2876,7 +2876,7 @@ mpii_wait(struct mpii_softc *sc, struct
>
> mtx_enter(&mtx);
> while (ccb->ccb_cookie != NULL)
> - msleep(ccb, &mtx, PRIBIO, "mpiiwait", 0);
> + msleep_nsec(ccb, &mtx, PRIBIO, "mpiiwait", INFSLP);
> mtx_leave(&mtx);
>
> ccb->ccb_cookie = cookie;
> Index: dev/pcmcia/if_malo.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pcmcia/if_malo.c,v
> retrieving revision 1.93
> diff -u -p -r1.93 if_malo.c
> --- dev/pcmcia/if_malo.c 26 Oct 2017 15:00:28 -0000 1.93
> +++ dev/pcmcia/if_malo.c 30 Dec 2019 15:57:25 -0000
> @@ -271,7 +271,7 @@ malo_pcmcia_wakeup(struct malo_softc *sc
>
> s = splnet();
> while (sc->sc_flags & MALO_BUSY)
> - tsleep(&sc->sc_flags, 0, "malopwr", 0);
> + tsleep_nsec(&sc->sc_flags, 0, "malopwr", INFSLP);
> sc->sc_flags |= MALO_BUSY;
>
> cmalo_init(ifp);
> @@ -372,7 +372,7 @@ cmalo_ioctl(struct ifnet *ifp, u_long cm
> * process is tsleep'ing in it.
> */
> while ((sc->sc_flags & MALO_BUSY) && error == 0)
> - error = tsleep(&sc->sc_flags, PCATCH, "maloioc", 0);
> + error = tsleep_nsec(&sc->sc_flags, PCATCH, "maloioc", INFSLP);
> if (error != 0) {
> splx(s);
> return error;
> Index: dev/pcmcia/if_wi_pcmcia.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pcmcia/if_wi_pcmcia.c,v
> retrieving revision 1.74
> diff -u -p -r1.74 if_wi_pcmcia.c
> --- dev/pcmcia/if_wi_pcmcia.c 24 Nov 2015 17:11:40 -0000 1.74
> +++ dev/pcmcia/if_wi_pcmcia.c 30 Dec 2019 15:54:58 -0000
> @@ -507,7 +507,7 @@ wi_pcmcia_wakeup(struct wi_softc *sc)
>
> s = splnet();
> while (sc->wi_flags & WI_FLAGS_BUSY)
> - tsleep(&sc->wi_flags, 0, "wipwr", 0);
> + tsleep_nsec(&sc->wi_flags, 0, "wipwr", INFSLP);
> sc->wi_flags |= WI_FLAGS_BUSY;
>
> wi_cor_reset(sc);
> Index: dev/pv/if_vio.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pv/if_vio.c,v
> retrieving revision 1.15
> diff -u -p -r1.15 if_vio.c
> --- dev/pv/if_vio.c 19 Dec 2019 10:15:21 -0000 1.15
> +++ dev/pv/if_vio.c 30 Dec 2019 15:55:34 -0000
> @@ -1277,9 +1277,11 @@ vio_sleep(struct vio_softc *sc, const ch
> int status = rw_status(&netlock);
>
> if (status != RW_WRITE && status != RW_READ)
> - return tsleep(&sc->sc_ctrl_inuse, PRIBIO|PCATCH, wmesg, 0);
> + return tsleep_nsec(&sc->sc_ctrl_inuse, PRIBIO|PCATCH, wmesg,
> + INFSLP);
>
> - return rwsleep(&sc->sc_ctrl_inuse, &netlock, PRIBIO|PCATCH, wmesg, 0);
> + return rwsleep_nsec(&sc->sc_ctrl_inuse, &netlock, PRIBIO|PCATCH, wmesg,
> + INFSLP);
> }
>
> int
> Index: dev/sbus/bpp.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/sbus/bpp.c,v
> retrieving revision 1.5
> diff -u -p -r1.5 bpp.c
> --- dev/sbus/bpp.c 14 Mar 2016 18:01:18 -0000 1.5
> +++ dev/sbus/bpp.c 30 Dec 2019 15:57:40 -0000
> @@ -288,7 +288,8 @@ bppwrite(dev_t dev, struct uio *uio, int
> }
>
> sc->sc_flags |= BPP_WANT;
> - error = tsleep(sc->sc_buf, PZERO | PCATCH, "bppwrite", 0);
> + error = tsleep_nsec(sc->sc_buf, PZERO | PCATCH, "bppwrite",
> + INFSLP);
> if (error != 0) {
> splx(s);
> return (error);
> @@ -332,7 +333,8 @@ bppwrite(dev_t dev, struct uio *uio, int
> /* Enable DMA */
> s = splbpp();
> DMA_GO(lsi);
> - error = tsleep(sc, PZERO | PCATCH, "bppdma", 0);
> + error = tsleep_nsec(sc, PZERO | PCATCH, "bppdma",
> + INFSLP);
> splx(s);
> if (error != 0)
> goto out;
> Index: dev/sbus/magma.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/sbus/magma.c,v
> retrieving revision 1.29
> diff -u -p -r1.29 magma.c
> --- dev/sbus/magma.c 19 Jul 2019 00:17:15 -0000 1.29
> +++ dev/sbus/magma.c 30 Dec 2019 15:56:20 -0000
> @@ -1589,7 +1589,8 @@ mbpp_rw(dev_t dev, struct uio *uio)
> s = spltty(); /* XXX */
> SET(mp->mp_flags, MBPPF_DELAY);
> timeout_add(&mp->mp_start_tmo, mp->mp_delay);
> - error = tsleep(mp, PCATCH | PZERO, "mbppdelay", 0);
> + error = tsleep_nsec(mp, PCATCH | PZERO, "mbppdelay",
> + INFSLP);
> splx(s);
> if (error)
> break;
> @@ -1673,7 +1674,7 @@ mbpp_send(struct mbpp_port *mp, caddr_t
> }
>
> /* ZZzzz... */
> - tsleep(mp, PCATCH | PZERO, "mbpp_send", 0);
> + tsleep_nsec(mp, PCATCH | PZERO, "mbpp_send", INFSLP);
>
> /* stop transmitting */
> if (cd) {
> @@ -1724,7 +1725,7 @@ mbpp_recv(struct mbpp_port *mp, caddr_t
> }
>
> /* ZZzzz... */
> - tsleep(mp, PCATCH | PZERO, "mbpp_recv", 0);
> + tsleep_nsec(mp, PCATCH | PZERO, "mbpp_recv", INFSLP);
>
> /* stop receiving */
> if (cd) {
> Index: dev/sbus/stp4020.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/sbus/stp4020.c,v
> retrieving revision 1.20
> diff -u -p -r1.20 stp4020.c
> --- dev/sbus/stp4020.c 27 Dec 2018 11:09:17 -0000 1.20
> +++ dev/sbus/stp4020.c 30 Dec 2019 15:56:31 -0000
> @@ -292,7 +292,7 @@ stp4020_event_thread(void *arg)
> s = splhigh();
> if ((socket = ffs(sc->events)) == 0) {
> splx(s);
> - (void)tsleep(&sc->events, PWAIT, "stp4020_ev", 0);
> + tsleep_nsec(&sc->events, PWAIT, "stp4020_ev", INFSLP);
> continue;
> }
> socket--;
> Index: dev/sdmmc/sdmmc.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/sdmmc/sdmmc.c,v
> retrieving revision 1.53
> diff -u -p -r1.53 sdmmc.c
> --- dev/sdmmc/sdmmc.c 2 Apr 2019 07:08:40 -0000 1.53
> +++ dev/sdmmc/sdmmc.c 30 Dec 2019 15:56:48 -0000
> @@ -162,7 +162,7 @@ sdmmc_detach(struct device *self, int fl
> sc->sc_dying = 1;
> while (sc->sc_task_thread != NULL) {
> wakeup(&sc->sc_tskq);
> - tsleep(sc, PWAIT, "mmcdie", 0);
> + tsleep_nsec(sc, PWAIT, "mmcdie", INFSLP);
> }
>
> if (sc->sc_dmap)
> @@ -226,7 +226,7 @@ restart:
> task->func(task->arg);
> s = splsdmmc();
> }
> - tsleep(&sc->sc_tskq, PWAIT, "mmctsk", 0);
> + tsleep_nsec(&sc->sc_tskq, PWAIT, "mmctsk", INFSLP);
> }
> splx(s);
>
> Index: dev/sdmmc/sdmmc_io.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/sdmmc/sdmmc_io.c,v
> retrieving revision 1.40
> diff -u -p -r1.40 sdmmc_io.c
> --- dev/sdmmc/sdmmc_io.c 9 Aug 2018 13:52:36 -0000 1.40
> +++ dev/sdmmc/sdmmc_io.c 30 Dec 2019 15:56:57 -0000
> @@ -244,7 +244,7 @@ sdmmc_io_function_enable(struct sdmmc_fu
> sdmmc_io_write_1(sf0, SD_IO_CCCR_FN_ENABLE, rv);
>
> while (!sdmmc_io_function_ready(sf) && retry-- > 0)
> - tsleep(&lbolt, PPAUSE, "pause", 0);
> + tsleep_nsec(&lbolt, PPAUSE, "pause", INFSLP);
> return (retry >= 0) ? 0 : ETIMEDOUT;
> }
>