*** usbdi.c.orig Sun Dec 26 04:10:14 1999 --- usbdi.c Sun Dec 26 04:13:16 1999 *************** *** 56,67 **** --- 56,69 ---- #include #include + #include #include #include #include #include #include + #include #if defined(__FreeBSD__) #include "usb_if.h" *************** *** 297,303 **** if (!xfer->done) { if (pipe->device->bus->use_polling) panic("usbd_transfer: not done\n"); ! tsleep(xfer, PRIBIO, "usbsyn", 0); } splx(s); return (xfer->status); --- 299,316 ---- if (!xfer->done) { if (pipe->device->bus->use_polling) panic("usbd_transfer: not done\n"); ! if (pipe->device->quirks->uq_flags & UQ_NO_TSLEEP) { ! int i; ! for (i = 0; i < xfer->timeout + 1; i++) { ! DELAY(1); ! pipe->device->bus->methods->do_poll(pipe->device->bus); ! if (xfer->done) ! break; ! } ! if (!xfer->done) ! pipe->methods->abort(xfer); ! } else ! tsleep(xfer, PRIBIO, "usbsyn", 0); } splx(s); return (xfer->status);