summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2019-11-27 11:17:00 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2019-11-27 11:17:00 +0000
commit5104f2354fe9dec52fd7c10ed2e4839ea6dc07e6 (patch)
tree59dfc09df672dbe7c1260ed4fb4fc9f3b59cead9 /sys/dev
parent2095bb3143174a50b27790f5529e7c69b19e962d (diff)
Convert infinite sleeps to tsleep_nsec(9).
ok bluhm@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/dwc2/dwc2.c4
-rw-r--r--sys/dev/usb/if_wi_usb.c8
-rw-r--r--sys/dev/usb/ohci.c4
-rw-r--r--sys/dev/usb/uhci.c4
-rw-r--r--sys/dev/usb/uhid.c4
5 files changed, 12 insertions, 12 deletions
diff --git a/sys/dev/usb/dwc2/dwc2.c b/sys/dev/usb/dwc2/dwc2.c
index 0e4d5517214..6f035467213 100644
--- a/sys/dev/usb/dwc2/dwc2.c
+++ b/sys/dev/usb/dwc2/dwc2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwc2.c,v 1.48 2019/03/14 04:28:10 visa Exp $ */
+/* $OpenBSD: dwc2.c,v 1.49 2019/11/27 11:16:59 mpi Exp $ */
/* $NetBSD: dwc2.c,v 1.32 2014/09/02 23:26:20 macallan Exp $ */
/*-
@@ -551,7 +551,7 @@ dwc2_abort_xfer(struct usbd_xfer *xfer, usbd_status status)
xfer->status = status;
dxfer->flags |= DWC2_XFER_ABORTWAIT;
while (dxfer->flags & DWC2_XFER_ABORTING)
- tsleep(&dxfer->flags, PZERO, "dwc2xfer", 0);
+ tsleep_nsec(&dxfer->flags, PZERO, "dwc2xfer", INFSLP);
return;
}
diff --git a/sys/dev/usb/if_wi_usb.c b/sys/dev/usb/if_wi_usb.c
index 5c2294cf090..b0f1b65756c 100644
--- a/sys/dev/usb/if_wi_usb.c
+++ b/sys/dev/usb/if_wi_usb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi_usb.c,v 1.70 2019/11/12 07:47:30 mpi Exp $ */
+/* $OpenBSD: if_wi_usb.c,v 1.71 2019/11/27 11:16:59 mpi Exp $ */
/*
* Copyright (c) 2003 Dale Rahn. All rights reserved.
@@ -1813,7 +1813,7 @@ wi_usb_thread(void *arg)
if (wi_thread_info->status == 0) {
s = splnet();
wi_thread_info->idle = 1;
- tsleep(wi_thread_info, PRIBIO, "wiIDL", 0);
+ tsleep_nsec(wi_thread_info, PRIBIO, "wiIDL", INFSLP);
wi_thread_info->idle = 0;
splx(s);
}
@@ -1854,7 +1854,7 @@ wi_usb_tx_lock(struct wi_usb_softc *sc)
sc->wi_lockwait++;
DPRINTFN(10,("%s: %s: busy %d\n", sc->wi_usb_dev.dv_xname,
__func__, sc->wi_lockwait ));
- tsleep(&sc->wi_lock, PRIBIO, "witxl", 0);
+ tsleep_nsec(&sc->wi_lock, PRIBIO, "witxl", INFSLP);
}
if (sc->wi_lock != 0)
@@ -1908,7 +1908,7 @@ wi_usb_ctl_lock(struct wi_usb_softc *sc)
sc->wi_ctllockwait++;
DPRINTFN(10,("%s: %s: busy %d\n", sc->wi_usb_dev.dv_xname,
__func__, sc->wi_ctllockwait ));
- tsleep(&sc->wi_ctllock, PRIBIO, "wiusbthr", 0);
+ tsleep_nsec(&sc->wi_ctllock, PRIBIO, "wiusbthr", INFSLP);
}
if (sc->wi_ctllock != 0)
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index eca48d41440..5f2d14937f9 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohci.c,v 1.156 2019/03/11 17:50:08 mpi Exp $ */
+/* $OpenBSD: ohci.c,v 1.157 2019/11/27 11:16:59 mpi Exp $ */
/* $NetBSD: ohci.c,v 1.139 2003/02/22 05:24:16 tsutsui Exp $ */
/* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */
@@ -2105,7 +2105,7 @@ ohci_abort_xfer(struct usbd_xfer *xfer, usbd_status status)
s = splusb();
sc->sc_softwake = 1;
usb_schedsoftintr(&sc->sc_bus);
- tsleep(&sc->sc_softwake, PZERO, "ohciab", 0);
+ tsleep_nsec(&sc->sc_softwake, PZERO, "ohciab", INFSLP);
splx(s);
/*
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c
index b4f43044561..61afda02715 100644
--- a/sys/dev/usb/uhci.c
+++ b/sys/dev/usb/uhci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhci.c,v 1.147 2019/03/12 08:13:50 ratchov Exp $ */
+/* $OpenBSD: uhci.c,v 1.148 2019/11/27 11:16:59 mpi Exp $ */
/* $NetBSD: uhci.c,v 1.172 2003/02/23 04:19:26 simonb Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */
@@ -1744,7 +1744,7 @@ uhci_abort_xfer(struct usbd_xfer *xfer, usbd_status status)
sc->sc_softwake = 1;
usb_schedsoftintr(&sc->sc_bus);
DPRINTFN(1,("uhci_abort_xfer: tsleep\n"));
- tsleep(&sc->sc_softwake, PZERO, "uhciab", 0);
+ tsleep_nsec(&sc->sc_softwake, PZERO, "uhciab", INFSLP);
splx(s);
/*
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c
index 526f068b035..28faca5d82d 100644
--- a/sys/dev/usb/uhid.c
+++ b/sys/dev/usb/uhid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhid.c,v 1.71 2018/05/01 18:14:46 landry Exp $ */
+/* $OpenBSD: uhid.c,v 1.72 2019/11/27 11:16:59 mpi Exp $ */
/* $NetBSD: uhid.c,v 1.57 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -260,7 +260,7 @@ uhid_do_read(struct uhid_softc *sc, struct uio *uio, int flag)
}
sc->sc_state |= UHID_ASLP;
DPRINTFN(5, ("uhidread: sleep on %p\n", &sc->sc_q));
- error = tsleep(&sc->sc_q, PZERO | PCATCH, "uhidrea", 0);
+ error = tsleep_nsec(&sc->sc_q, PZERO|PCATCH, "uhidrea", INFSLP);
DPRINTFN(5, ("uhidread: woke, error=%d\n", error));
if (usbd_is_dying(sc->sc_hdev.sc_udev))
error = EIO;