Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Finally get rid of the UGLY and EVIL hack for av...
details: https://anonhg.NetBSD.org/src/rev/0208643a6c68
branches: trunk
changeset: 508554:0208643a6c68
user: augustss <augustss%NetBSD.org@localhost>
date: Fri Apr 13 11:19:58 2001 +0000
description:
Finally get rid of the UGLY and EVIL hack for avoiding tsleep().
diffstat:
sys/dev/usb/usbdi.c | 25 ++-----------------------
sys/dev/usb/usbdi.h | 5 +----
2 files changed, 3 insertions(+), 27 deletions(-)
diffs (58 lines):
diff -r a4c41f6a1a15 -r 0208643a6c68 sys/dev/usb/usbdi.c
--- a/sys/dev/usb/usbdi.c Fri Apr 13 11:17:11 2001 +0000
+++ b/sys/dev/usb/usbdi.c Fri Apr 13 11:19:58 2001 +0000
@@ -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: src/sys/dev/usb/usbdi.c,v 1.28 1999/11/17 22:33:49 n_hibma Exp $ */
/*
@@ -294,28 +294,7 @@
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 -r a4c41f6a1a15 -r 0208643a6c68 sys/dev/usb/usbdi.h
--- a/sys/dev/usb/usbdi.h Fri Apr 13 11:17:11 2001 +0000
+++ b/sys/dev/usb/usbdi.h Fri Apr 13 11:19:58 2001 +0000
@@ -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: src/sys/dev/usb/usbdi.h,v 1.18 1999/11/17 22:33:49 n_hibma Exp $ */
/*
@@ -85,9 +85,6 @@
/* 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 */
Home |
Main Index |
Thread Index |
Old Index