summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usbdi.c
diff options
context:
space:
mode:
authorjoe <joe@FreeBSD.org>2002-04-02 14:28:18 +0000
committerjoe <joe@FreeBSD.org>2002-04-02 14:28:18 +0000
commitf47a79c6730e82bef42ff6477a29612f18447d8c (patch)
treec8a6d1c13dd1e728bf79fbcd51734d3ba9fe8bca /sys/dev/usb/usbdi.c
parenta95eca886e65133dcabd3139d26f00cf3c81a0d0 (diff)
downloadFreeBSD-src-f47a79c6730e82bef42ff6477a29612f18447d8c.zip
FreeBSD-src-f47a79c6730e82bef42ff6477a29612f18447d8c.tar.gz
MFNetBSD: usbdi.c (1.80), usbdi.h (1.51)
date: 2001/04/13 11:19:58; author: augustss; Finally get rid of the UGLY and EVIL hack for avoiding tsleep().
Diffstat (limited to 'sys/dev/usb/usbdi.c')
-rw-r--r--sys/dev/usb/usbdi.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c
index 4bf3a13..7fcfb4b 100644
--- a/sys/dev/usb/usbdi.c
+++ b/sys/dev/usb/usbdi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: usbdi.c,v 1.79 2001/01/21 02:39:53 augustss Exp $ */
+/* $NetBSD: usbdi.c,v 1.80 2001/04/13 11:19:58 augustss Exp $ */
/* $FreeBSD$ */
/*
@@ -294,28 +294,7 @@ usbd_transfer(usbd_xfer_handle xfer)
if (!xfer->done) {
if (pipe->device->bus->use_polling)
panic("usbd_transfer: not done\n");
- /* XXX Temporary hack XXX */
- if (xfer->flags & USBD_NO_TSLEEP) {
- int i;
- usbd_bus_handle bus = pipe->device->bus;
- int to = xfer->timeout * 1000;
- DPRINTFN(2,("usbd_transfer: polling\n"));
- for (i = 0; i < to; i += 10) {
- delay(10);
- bus->methods->do_poll(bus);
- if (xfer->done)
- break;
- }
- DPRINTFN(2,("usbd_transfer: polling done =\n",
- xfer->done));
- /* XXX Is this right, what about the HC timeout? */
- if (!xfer->done) {
- pipe->methods->abort(xfer);
- xfer->status = USBD_TIMEOUT;
- }
- } else
- /* XXX End hack XXX */
- tsleep(xfer, PRIBIO, "usbsyn", 0);
+ tsleep(xfer, PRIBIO, "usbsyn", 0);
}
splx(s);
return (xfer->status);
OpenPOWER on IntegriCloud