diff options
author | wpaul <wpaul@FreeBSD.org> | 2000-01-19 01:01:56 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2000-01-19 01:01:56 +0000 |
commit | a3e3508a66ace44627b905713b798e6fbdfe1f64 (patch) | |
tree | d84a44c6926f0dc655f78bab36e4f5564785abd2 /sys/dev/usb/usbdi.c | |
parent | 950ca24be43fda81b9e0ced7be814c80002f22bd (diff) | |
download | FreeBSD-src-a3e3508a66ace44627b905713b798e6fbdfe1f64.zip FreeBSD-src-a3e3508a66ace44627b905713b798e6fbdfe1f64.tar.gz |
Fix a couple of bugs:
- The busy wait hack in usbdi.c was doing its timeout in microseconds
instead of milliseconds.
- if_aue.c:aue_intr() is creating a bitmask by and'ing two bits when it
should be or'ing them.
Submitted by: Lennart Augustsson
Diffstat (limited to 'sys/dev/usb/usbdi.c')
-rw-r--r-- | sys/dev/usb/usbdi.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c index 9b9fafd..a544206 100644 --- a/sys/dev/usb/usbdi.c +++ b/sys/dev/usb/usbdi.c @@ -300,10 +300,13 @@ usbd_transfer(xfer) 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); + int i, to; + usbd_bus_handle bus; + to = xfer->timeout * 1000; + bus = pipe->device->bus; + for (i = 0; i < to; i += 10) { + DELAY(10); + bus->methods->do_poll(bus); if (xfer->done) break; } |