summaryrefslogtreecommitdiff
path: root/sys/dev/usb/uhci.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2014-03-15 09:49:29 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2014-03-15 09:49:29 +0000
commit33b58e6211c2093933e82aef68b3c59844eda7da (patch)
treeb6494d272e7b5d2b5a5133b5edc652c9173efa71 /sys/dev/usb/uhci.c
parent04fb61f5b786576529c7d205ed6e9874849be523 (diff)
Unify the *hci_timeout() functions, there should be no functional change.
Diffstat (limited to 'sys/dev/usb/uhci.c')
-rw-r--r--sys/dev/usb/uhci.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c
index d1e53b34f7a..cf63fcaab8e 100644
--- a/sys/dev/usb/uhci.c
+++ b/sys/dev/usb/uhci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhci.c,v 1.108 2014/03/11 10:24:42 mpi Exp $ */
+/* $OpenBSD: uhci.c,v 1.109 2014/03/15 09:49:28 mpi Exp $ */
/* $NetBSD: uhci.c,v 1.172 2003/02/23 04:19:26 simonb Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */
@@ -1359,27 +1359,20 @@ uhci_idone(struct uhci_xfer *ex)
DPRINTFN(12, ("uhci_idone: ex=%p done\n", ex));
}
-/*
- * Called when a request does not complete.
- */
void
uhci_timeout(void *addr)
{
- struct uhci_xfer *uxfer = addr;
- struct uhci_pipe *upipe = (struct uhci_pipe *)uxfer->xfer.pipe;
- struct uhci_softc *sc = (struct uhci_softc *)upipe->pipe.device->bus;
-
- DPRINTF(("uhci_timeout: uxfer=%p\n", uxfer));
+ struct usbd_xfer *xfer = addr;
+ struct uhci_softc *sc = (struct uhci_softc *)xfer->device->bus;
if (sc->sc_bus.dying) {
- uhci_abort_xfer(&uxfer->xfer, USBD_TIMEOUT);
+ uhci_timeout_task(addr);
return;
}
- /* Execute the abort in a process context. */
- usb_init_task(&uxfer->xfer.abort_task, uhci_timeout_task, &uxfer->xfer,
+ usb_init_task(&xfer->abort_task, uhci_timeout_task, addr,
USB_TASK_TYPE_ABORT);
- usb_add_task(uxfer->xfer.pipe->device, &uxfer->xfer.abort_task);
+ usb_add_task(xfer->device, &xfer->abort_task);
}
void
@@ -1388,7 +1381,7 @@ uhci_timeout_task(void *addr)
struct usbd_xfer *xfer = addr;
int s;
- DPRINTF(("uhci_timeout_task: xfer=%p\n", xfer));
+ DPRINTF(("%s: xfer=%p\n", __func__, xfer));
s = splusb();
uhci_abort_xfer(xfer, USBD_TIMEOUT);