diff options
author | 2019-10-08 11:07:16 +0000 | |
---|---|---|
committer | 2019-10-08 11:07:16 +0000 | |
commit | 8b8f331b97436da4243e252dc178c1e51a673196 (patch) | |
tree | 4bfd98ee759a729fa4cac08f4dcc14ddcb2aa379 | |
parent | Rewrite the output handling of rpki-client and add an option to dump the (diff) | |
download | wireguard-openbsd-8b8f331b97436da4243e252dc178c1e51a673196.tar.xz wireguard-openbsd-8b8f331b97436da4243e252dc178c1e51a673196.zip |
Convert tsleep(9) to tsleep_nsec(9).
ok visa@, kn@, cheloha@
-rw-r--r-- | sys/dev/usb/ehci.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c index 665fd0db056..a142c638b33 100644 --- a/sys/dev/usb/ehci.c +++ b/sys/dev/usb/ehci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ehci.c,v 1.204 2019/03/31 06:16:38 mglocker Exp $ */ +/* $OpenBSD: ehci.c,v 1.205 2019/10/08 11:07:16 mpi Exp $ */ /* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */ /* @@ -1628,7 +1628,8 @@ ehci_sync_hc(struct ehci_softc *sc) do { EOWRITE4(sc, EHCI_USBCMD, EOREAD4(sc, EHCI_USBCMD) | EHCI_CMD_IAAD); - error = tsleep(&sc->sc_async_head, PZERO, "ehcidi", hz / 2); + error = tsleep_nsec(&sc->sc_async_head, PZERO, "ehcidi", + MSEC_TO_NSEC(500)); } while (error && ++tries < 10); splx(s); /* release doorbell */ @@ -2648,7 +2649,7 @@ ehci_abort_xfer(struct usbd_xfer *xfer, usbd_status status) DPRINTFN(2, ("ehci_abort_xfer: waiting for abort to finish\n")); ex->ehci_xfer_flags |= EHCI_XFER_ABORTWAIT; while (ex->ehci_xfer_flags & EHCI_XFER_ABORTING) - tsleep(&ex->ehci_xfer_flags, PZERO, "ehciaw", 0); + tsleep_nsec(&ex->ehci_xfer_flags, PZERO, "ehciaw", INFSLP); return; } @@ -2699,7 +2700,7 @@ ehci_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, "ehciab", 0); + tsleep_nsec(&sc->sc_softwake, PZERO, "ehciab", INFSLP); #ifdef DIAGNOSTIC ex->isdone = 1; @@ -2789,7 +2790,7 @@ ehci_abort_isoc_xfer(struct usbd_xfer *xfer, usbd_status status) sc->sc_softwake = 1; usb_schedsoftintr(&sc->sc_bus); - tsleep(&sc->sc_softwake, PZERO, "ehciab", 0); + tsleep_nsec(&sc->sc_softwake, PZERO, "ehciab", INFSLP); usb_transfer_complete(xfer); } |