aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2007-06-28 06:22:40 +0000
committerWarner Losh <imp@FreeBSD.org>2007-06-28 06:22:40 +0000
commit97299109999c9beeb267321b91e0498598e2297c (patch)
treee4bbb8d6e36992bc5aa0aa3f13b5540172befd96 /sys
parentf8f10e94cfa2879546ce8981f5f56e84cd3a38a1 (diff)
downloadsrc-97299109999c9beeb267321b91e0498598e2297c.tar.gz
src-97299109999c9beeb267321b91e0498598e2297c.zip
The timeout is in milliseconds, not in hz. Only the portion of the
patch that converts ms to ticks was used. Another PR states that a return code of 0 is the right one for libusb. Submitted by: Lonnie Mendez PR: 94311 Approved by: re (blanket)
Notes
Notes: svn path=/head/; revision=171076
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/ugen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c
index 50fed1f44b47..a63422feb305 100644
--- a/sys/dev/usb/ugen.c
+++ b/sys/dev/usb/ugen.c
@@ -715,7 +715,7 @@ ugen_do_read(struct ugen_softc *sc, int endpt, struct uio *uio, int flag)
sce->state |= UGEN_ASLP;
DPRINTFN(5, ("ugenread: sleep on %p\n", sce));
error = tsleep(sce, PZERO | PCATCH, "ugenri",
- sce->timeout);
+ (sce->timeout * hz + 999) / 1000);
sce->state &= ~UGEN_ASLP;
DPRINTFN(5, ("ugenread: woke, error=%d\n", error));
if (sc->sc_dying)
@@ -785,7 +785,7 @@ ugen_do_read(struct ugen_softc *sc, int endpt, struct uio *uio, int flag)
sce->state |= UGEN_ASLP;
DPRINTFN(5, ("ugenread: sleep on %p\n", sce));
error = tsleep(sce, PZERO | PCATCH, "ugenri",
- sce->timeout);
+ (sce->timeout * hz + 999) / 1000);
sce->state &= ~UGEN_ASLP;
DPRINTFN(5, ("ugenread: woke, error=%d\n", error));
if (sc->sc_dying)