diff options
Diffstat (limited to 'sys/dev/usb/ehci.c')
-rw-r--r-- | sys/dev/usb/ehci.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c index a417828..a5e68fb 100644 --- a/sys/dev/usb/ehci.c +++ b/sys/dev/usb/ehci.c @@ -755,6 +755,7 @@ ehci_check_intr(ehci_softc_t *sc, struct ehci_xfer *ex) done: DPRINTFN(12, ("ehci_check_intr: ex=%p done\n", ex)); usb_uncallout(ex->xfer.timeout_handle, ehci_timeout, ex); + usb_rem_task(ex->xfer.pipe->device, &ex->abort_task); ehci_idone(ex); } @@ -1169,6 +1170,8 @@ ehci_allocx(struct usbd_bus *bus) } if (xfer != NULL) { memset(xfer, 0, sizeof(struct ehci_xfer)); + usb_init_task(&EXFER(xfer)->abort_task, ehci_timeout_task, + xfer); #ifdef DIAGNOSTIC EXFER(xfer)->isdone = 1; xfer->busy_free = XFER_BUSY; @@ -2496,6 +2499,7 @@ ehci_abort_xfer(usbd_xfer_handle xfer, usbd_status status) s = splusb(); xfer->status = status; /* make software ignore it */ usb_uncallout(xfer->timeout_handle, ehci_timeout, xfer); + usb_rem_task(epipe->pipe.device, &exfer->abort_task); usb_transfer_complete(xfer); splx(s); return; @@ -2510,6 +2514,7 @@ ehci_abort_xfer(usbd_xfer_handle xfer, usbd_status status) s = splusb(); xfer->status = status; /* make software ignore it */ usb_uncallout(xfer->timeout_handle, ehci_timeout, xfer); + usb_rem_task(epipe->pipe.device, &exfer->abort_task); qhstatus = sqh->qh.qh_qtd.qtd_status; sqh->qh.qh_qtd.qtd_status = qhstatus | htole32(EHCI_QTD_HALTED); for (sqtd = exfer->sqtdstart; ; sqtd = sqtd->nextqtd) { @@ -2591,7 +2596,6 @@ ehci_timeout(void *addr) } /* Execute the abort in a process context. */ - usb_init_task(&exfer->abort_task, ehci_timeout_task, addr); usb_add_task(exfer->xfer.pipe->device, &exfer->abort_task); } |