summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoe <joe@FreeBSD.org>2002-04-07 12:18:52 +0000
committerjoe <joe@FreeBSD.org>2002-04-07 12:18:52 +0000
commit2987f747379ff01433758481243671b4fb26bba0 (patch)
tree9806ce7b089725995b09f1ac52f17862365abed5
parentc3a0c1290d615e952c40a28701821bd3200e7dce (diff)
downloadFreeBSD-src-2987f747379ff01433758481243671b4fb26bba0.zip
FreeBSD-src-2987f747379ff01433758481243671b4fb26bba0.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().
-rw-r--r--sys/dev/usb/usbdi.c25
-rw-r--r--sys/dev/usb/usbdi.h5
2 files changed, 3 insertions, 27 deletions
diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c
index fd65b30..ae33f99 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$ */
/*
@@ -338,28 +338,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);
diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h
index 81198c9..3f7129d 100644
--- a/sys/dev/usb/usbdi.h
+++ b/sys/dev/usb/usbdi.h
@@ -1,4 +1,4 @@
-/* $NetBSD: usbdi.h,v 1.50 2001/04/12 01:18:24 thorpej Exp $ */
+/* $NetBSD: usbdi.h,v 1.51 2001/04/13 11:19:58 augustss Exp $ */
/* $FreeBSD$ */
/*
@@ -85,9 +85,6 @@ typedef void (*usbd_callback)(usbd_xfer_handle, usbd_private_handle,
/* in usb.h #define USBD_SHORT_XFER_OK 0x04*/ /* allow short reads */
#define USBD_FORCE_SHORT_XFER 0x08 /* force last short packet on write */
-/* XXX Temporary hack XXX */
-#define USBD_NO_TSLEEP 0x80 /* XXX use busy wait */
-
#define USBD_NO_TIMEOUT 0
#define USBD_DEFAULT_TIMEOUT 5000 /* ms = 5 s */
OpenPOWER on IntegriCloud