summaryrefslogtreecommitdiff
path: root/sys/dev/usb/usbdi.c
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2001-05-03 02:20:36 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2001-05-03 02:20:36 +0000
commit5b92d7a741e1c34c9d68a85e4b9a47c24ea37b56 (patch)
treeac62c98e8633ce27c0186aaa2e0856e4093ade97 /sys/dev/usb/usbdi.c
parentc31dae3edb4a874106f38c4f1418182e49eda727 (diff)
Sync with NetBSD. Tested with a USB keyboard, USB mouse, and three different
kue(4) Ethernet devices.
Diffstat (limited to 'sys/dev/usb/usbdi.c')
-rw-r--r--sys/dev/usb/usbdi.c30
1 files changed, 9 insertions, 21 deletions
diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c
index d1392fa8bc8..8aa3f46afd3 100644
--- a/sys/dev/usb/usbdi.c
+++ b/sys/dev/usb/usbdi.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: usbdi.c,v 1.13 2001/01/28 09:43:42 aaron Exp $ */
-/* $NetBSD: usbdi.c,v 1.77 2000/09/23 21:02:04 augustss Exp $ */
+/* $OpenBSD: usbdi.c,v 1.14 2001/05/03 02:20:34 aaron Exp $ */
+/* $NetBSD: usbdi.c,v 1.81 2001/04/17 00:05:33 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdi.c,v 1.28 1999/11/17 22:33:49 n_hibma Exp $ */
/*
@@ -295,25 +295,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;
- for (i = 0; i < to; i += 10) {
- delay(10);
- bus->methods->do_poll(bus);
- if (xfer->done)
- break;
- }
- /* 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);
@@ -1015,6 +997,12 @@ usbd_do_request_async(usbd_device_handle dev, usb_device_request_t *req,
const struct usbd_quirks *
usbd_get_quirks(usbd_device_handle dev)
{
+#ifdef DIAGNOSTIC
+ if (dev == NULL) {
+ printf("usbd_get_quirks: dev == NULL\n");
+ return 0;
+ }
+#endif
return (dev->quirks);
}