diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2013-11-09 08:40:33 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2013-11-09 08:40:33 +0000 |
commit | 3c4a62bc68f80657362a71d785beb53f5a3f27a4 (patch) | |
tree | e8704bba4c3d16e6e1f321860d8e60bf5dac4734 /sys/dev | |
parent | 99531c5532cf8da574a34db16f8fa43f41c4c45a (diff) |
Reduce the differences between our controller drivers and initialize
the timeout task in the *_timeout() routine. It now becomes obvious
that the allocx/freex hooks can be merged.
ok pirofti@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/ehci.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c index e69afb60dfe..7b15b6dd629 100644 --- a/sys/dev/usb/ehci.c +++ b/sys/dev/usb/ehci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ehci.c,v 1.136 2013/11/07 10:15:15 mpi Exp $ */ +/* $OpenBSD: ehci.c,v 1.137 2013/11/09 08:40:32 mpi Exp $ */ /* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */ /* @@ -1182,8 +1182,6 @@ ehci_allocx(struct usbd_bus *bus) if (xfer != NULL) { memset(xfer, 0, sizeof(struct ehci_xfer)); - usb_init_task(&xfer->abort_task, ehci_timeout_task, - xfer, USB_TASK_TYPE_ABORT); EXFER(xfer)->ehci_xfer_flags = 0; #ifdef DIAGNOSTIC EXFER(xfer)->isdone = 1; @@ -2915,10 +2913,6 @@ ehci_timeout(void *addr) struct ehci_softc *sc = (struct ehci_softc *)epipe->pipe.device->bus; DPRINTF(("ehci_timeout: exfer=%p\n", exfer)); -#if defined(EHCI_DEBUG) && defined(USB_DEBUG) - if (ehcidebug > 1) - usbd_dump_pipe(exfer->xfer.pipe); -#endif if (sc->sc_bus.dying) { ehci_abort_xfer(&exfer->xfer, USBD_TIMEOUT); @@ -2926,6 +2920,8 @@ ehci_timeout(void *addr) } /* Execute the abort in a process context. */ + usb_init_task(&exfer->xfer.abort_task, ehci_timeout_task, addr, + USB_TASK_TYPE_ABORT); usb_add_task(exfer->xfer.pipe->device, &exfer->xfer.abort_task); } |