Ensure we catch USB transfers which complete right away.

This commit is contained in:
hselasky 2014-08-05 06:31:09 +00:00
parent b2635de275
commit 907d8331c7

View File

@ -1927,7 +1927,7 @@ saf1761_otg_start_standard_chain(struct usb_xfer *xfer)
/* poll one time */
saf1761_otg_xfer_do_fifo(sc, xfer);
if (xfer->td_transfer_cache != NULL) {
if (saf1761_otg_xfer_do_complete(sc, xfer) == 0) {
/*
* Only enable the endpoint interrupt when we are
* actually waiting for data, hence we are dealing
@ -1943,9 +1943,6 @@ saf1761_otg_start_standard_chain(struct usb_xfer *xfer)
usbd_transfer_timeout_ms(xfer,
&saf1761_otg_timeout, xfer->timeout);
}
} else {
/* catch completion, if any */
saf1761_otg_interrupt_complete_locked(sc);
}
USB_BUS_SPIN_UNLOCK(&sc->sc_bus);
}