diff options
| -rw-r--r-- | sys/dev/usb/if_aue.c | 2 | ||||
| -rw-r--r-- | sys/dev/usb/usbdi.c | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c index 2ce83fbca6c71..42f28f4eeb431 100644 --- a/sys/dev/usb/if_aue.c +++ b/sys/dev/usb/if_aue.c @@ -872,7 +872,7 @@ static void aue_intr(xfer, priv, status) if (p->aue_txstat0) ifp->if_oerrors++; - if (p->aue_txstat0 & (AUE_TXSTAT0_LATECOLL & AUE_TXSTAT0_EXCESSCOLL)) + if (p->aue_txstat0 & (AUE_TXSTAT0_LATECOLL | AUE_TXSTAT0_EXCESSCOLL)) ifp->if_collisions++; splx(s); diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c index 9b9fafd514b66..a5442060878a3 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; } |
