summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2020-01-04 11:35:03 +0000
committermpi <mpi@openbsd.org>2020-01-04 11:35:03 +0000
commita94d7c77d22617896222d0ce8b65c4ae588dd8a6 (patch)
tree6f1f065c2360054c3e1a9a000c8e553a25d750ee
parentJason suggested that stating defaults with a postfix "(on/off by default)" (diff)
downloadwireguard-openbsd-a94d7c77d22617896222d0ce8b65c4ae588dd8a6.tar.xz
wireguard-openbsd-a94d7c77d22617896222d0ce8b65c4ae588dd8a6.zip
UPGT_USB_TIMEOUT is specified in msec not in ticks, correct the timeout
value of the sleep by using tsleep_nsec(9). ok mglocker@
-rw-r--r--sys/dev/usb/if_upgt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/usb/if_upgt.c b/sys/dev/usb/if_upgt.c
index 6c8b66842fb..e985c5acd6e 100644
--- a/sys/dev/usb/if_upgt.c
+++ b/sys/dev/usb/if_upgt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_upgt.c,v 1.84 2019/06/14 13:20:49 kn Exp $ */
+/* $OpenBSD: if_upgt.c,v 1.85 2020/01/04 11:35:03 mpi Exp $ */
/*
* Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org>
@@ -906,7 +906,8 @@ upgt_eeprom_read(struct upgt_softc *sc)
sc->sc_dev.dv_xname);
return (EIO);
}
- if (tsleep(sc, 0, "eeprom_request", UPGT_USB_TIMEOUT)) {
+ if (tsleep_nsec(sc, 0, "eeprom_request",
+ MSEC_TO_NSEC(UPGT_USB_TIMEOUT))) {
printf("%s: timeout while waiting for EEPROM data!\n",
sc->sc_dev.dv_xname);
return (EIO);