summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2020-01-04 11:36:05 +0000
committermpi <mpi@openbsd.org>2020-01-04 11:36:05 +0000
commit6c7b205342e2079b449d63dbf721f5a5f9add623 (patch)
treeba8c77655e9aaddfd53dbc5f437c5069ed4f7853
parentUPGT_USB_TIMEOUT is specified in msec not in ticks, correct the timeout (diff)
downloadwireguard-openbsd-6c7b205342e2079b449d63dbf721f5a5f9add623.tar.xz
wireguard-openbsd-6c7b205342e2079b449d63dbf721f5a5f9add623.zip
Convert sleep to tsleep_nsec(9).
ok bluhm@
-rw-r--r--sys/dev/usb/uow.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/usb/uow.c b/sys/dev/usb/uow.c
index 193ea59c85b..f334103d616 100644
--- a/sys/dev/usb/uow.c
+++ b/sys/dev/usb/uow.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uow.c,v 1.35 2016/11/06 12:58:01 mpi Exp $ */
+/* $OpenBSD: uow.c,v 1.36 2020/01/04 11:36:05 mpi Exp $ */
/*
* Copyright (c) 2006 Alexander Yurchenko <grange@openbsd.org>
@@ -424,8 +424,8 @@ uow_cmd(struct uow_softc *sc, int type, int cmd, int param)
}
again:
- if (tsleep(sc->sc_regs, PRIBIO, "uowcmd",
- (UOW_TIMEOUT * hz) / 1000) != 0) {
+ if (tsleep_nsec(sc->sc_regs, PRIBIO, "uowcmd",
+ MSEC_TO_NSEC(UOW_TIMEOUT)) != 0) {
printf("%s: cmd timeout, type 0x%02x, cmd 0x%04x, "
"param 0x%04x\n", sc->sc_dev.dv_xname, type, cmd,
param);