From 907d8331c75908e9d6c0478fceb93611defcac8c Mon Sep 17 00:00:00 2001 From: hselasky Date: Tue, 5 Aug 2014 06:31:09 +0000 Subject: [PATCH] Ensure we catch USB transfers which complete right away. --- sys/dev/usb/controller/saf1761_otg.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/dev/usb/controller/saf1761_otg.c b/sys/dev/usb/controller/saf1761_otg.c index 0f5b4741d753..debd50e56e35 100644 --- a/sys/dev/usb/controller/saf1761_otg.c +++ b/sys/dev/usb/controller/saf1761_otg.c @@ -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); }