Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb In eohci_waitintr, xfer->timeout is in ms, not hz.



details:   https://anonhg.NetBSD.org/src/rev/250e795bca59
branches:  trunk
changeset: 580597:250e795bca59
user:      augustss <augustss%NetBSD.org@localhost>
date:      Sun May 01 01:14:30 2005 +0000

description:
In eohci_waitintr, xfer->timeout is in ms, not hz.

>From OpenBSD.

diffstat:

 sys/dev/usb/ohci.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (33 lines):

diff -r c152505d0eee -r 250e795bca59 sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c        Sun May 01 01:10:06 2005 +0000
+++ b/sys/dev/usb/ohci.c        Sun May 01 01:14:30 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ohci.c,v 1.162 2005/05/01 01:10:06 augustss Exp $      */
+/*     $NetBSD: ohci.c,v 1.163 2005/05/01 01:14:30 augustss Exp $      */
 /*     $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $       */
 
 /*
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.162 2005/05/01 01:10:06 augustss Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.163 2005/05/01 01:14:30 augustss Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1570,12 +1570,11 @@
 void
 ohci_waitintr(ohci_softc_t *sc, usbd_xfer_handle xfer)
 {
-       int timo = xfer->timeout;
-       int usecs;
+       int timo;
        u_int32_t intrs;
 
        xfer->status = USBD_IN_PROGRESS;
-       for (usecs = timo * 1000000 / hz; usecs > 0; usecs -= 1000) {
+       for (timo = xfer->timeout; timo >= 0; timo--) {
                usb_delay_ms(&sc->sc_bus, 1);
                if (sc->sc_dying)
                        break;



Home | Main Index | Thread Index | Old Index