diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2019-10-08 11:07:17 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2019-10-08 11:07:17 +0000 |
commit | fa96f56b15de1fb073a5abfb14c3509cd48349cd (patch) | |
tree | e1cc0ccb61e3746ef4b87e1b10932045dae36242 /sys/dev/usb | |
parent | e75f29ac2ac22ad29a23a969196a8617a6596111 (diff) |
Convert tsleep(9) to tsleep_nsec(9).
ok visa@, kn@, cheloha@
Diffstat (limited to 'sys/dev/usb')
-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); } |