Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Get timeout right in the gruesome hack.



details:   https://anonhg.NetBSD.org/src/rev/9b1f48e819a1
branches:  trunk
changeset: 480595:9b1f48e819a1
user:      augustss <augustss%NetBSD.org@localhost>
date:      Sun Jan 16 13:34:51 2000 +0000

description:
Get timeout right in the gruesome hack.

diffstat:

 sys/dev/usb/usbdi.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 1442c149c0b9 -r 9b1f48e819a1 sys/dev/usb/usbdi.c
--- a/sys/dev/usb/usbdi.c       Sun Jan 16 13:22:18 2000 +0000
+++ b/sys/dev/usb/usbdi.c       Sun Jan 16 13:34:51 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbdi.c,v 1.55 2000/01/16 13:22:18 augustss Exp $      */
+/*     $NetBSD: usbdi.c,v 1.56 2000/01/16 13:34:51 augustss Exp $      */
 /*     $FreeBSD: src/sys/dev/usb/usbdi.c,v 1.28 1999/11/17 22:33:49 n_hibma Exp $      */
 
 /*
@@ -307,7 +307,8 @@
                if (xfer->flags & USBD_NO_TSLEEP) {
                        int i;
                        usbd_bus_handle bus = pipe->device->bus;
-                       for (i = 0; i < xfer->timeout; i += 10) {
+                       int to = xfer->timeout * 1000;
+                       for (i = 0; i < to; i += 10) {
                                delay(10);
                                bus->methods->do_poll(bus);
                                if (xfer->done)
@@ -316,6 +317,7 @@
                        if (!xfer->done)
                                pipe->methods->abort(xfer);
                } else
+               /* XXX End hack XXX */
                        tsleep(xfer, PRIBIO, "usbsyn", 0);
        }
        splx(s);



Home | Main Index | Thread Index | Old Index