summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2020-01-04 11:35:04 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2020-01-04 11:35:04 +0000
commit4c9531ca3362b0cc3f21cad17bfd4fae6cd506a4 (patch)
tree4e1f80da69a5214c2f9a5863e2c3e27119e8116a /sys/dev/usb
parentbf7b3f791d475b834af8cd7f8865d7deb9856b55 (diff)
UPGT_USB_TIMEOUT is specified in msec not in ticks, correct the timeout
value of the sleep by using tsleep_nsec(9). ok mglocker@
Diffstat (limited to 'sys/dev/usb')
-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);