summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/ehci.c18
-rw-r--r--sys/dev/usb/ohci.c18
-rw-r--r--sys/dev/usb/uhci.c21
3 files changed, 21 insertions, 36 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c
index 51348382657..5f232d43654 100644
--- a/sys/dev/usb/ehci.c
+++ b/sys/dev/usb/ehci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ehci.c,v 1.144 2014/03/11 10:24:42 mpi Exp $ */
+/* $OpenBSD: ehci.c,v 1.145 2014/03/15 09:49:28 mpi Exp $ */
/* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */
/*
@@ -2906,21 +2906,17 @@ ehci_abort_isoc_xfer(struct usbd_xfer *xfer, usbd_status status)
void
ehci_timeout(void *addr)
{
- struct ehci_xfer *exfer = addr;
- struct ehci_pipe *epipe = (struct ehci_pipe *)exfer->xfer.pipe;
- struct ehci_softc *sc = (struct ehci_softc *)epipe->pipe.device->bus;
-
- DPRINTF(("ehci_timeout: exfer=%p\n", exfer));
+ struct usbd_xfer *xfer = addr;
+ struct ehci_softc *sc = (struct ehci_softc *)xfer->device->bus;
if (sc->sc_bus.dying) {
- ehci_abort_xfer(&exfer->xfer, USBD_TIMEOUT);
+ ehci_timeout_task(addr);
return;
}
- /* Execute the abort in a process context. */
- usb_init_task(&exfer->xfer.abort_task, ehci_timeout_task, addr,
+ usb_init_task(&xfer->abort_task, ehci_timeout_task, addr,
USB_TASK_TYPE_ABORT);
- usb_add_task(exfer->xfer.pipe->device, &exfer->xfer.abort_task);
+ usb_add_task(xfer->device, &xfer->abort_task);
}
void
@@ -2929,7 +2925,7 @@ ehci_timeout_task(void *addr)
struct usbd_xfer *xfer = addr;
int s;
- DPRINTF(("ehci_timeout_task: xfer=%p\n", xfer));
+ DPRINTF(("%s: xfer=%p\n", __func__, xfer));
s = splusb();
ehci_abort_xfer(xfer, USBD_TIMEOUT);
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index 4554d18e25b..ef46ab4518c 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohci.c,v 1.122 2014/03/11 10:24:42 mpi Exp $ */
+/* $OpenBSD: ohci.c,v 1.123 2014/03/15 09:49:28 mpi Exp $ */
/* $NetBSD: ohci.c,v 1.139 2003/02/22 05:24:16 tsutsui Exp $ */
/* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */
@@ -1827,21 +1827,17 @@ ohci_hash_find_itd(struct ohci_softc *sc, ohci_physaddr_t a)
void
ohci_timeout(void *addr)
{
- struct ohci_xfer *oxfer = addr;
- struct ohci_pipe *opipe = (struct ohci_pipe *)oxfer->xfer.pipe;
- struct ohci_softc *sc = (struct ohci_softc *)opipe->pipe.device->bus;
-
- DPRINTF(("ohci_timeout: oxfer=%p\n", oxfer));
+ struct usbd_xfer *xfer = addr;
+ struct ohci_softc *sc = (struct ohci_softc *)xfer->device->bus;
if (sc->sc_bus.dying) {
- ohci_abort_xfer(&oxfer->xfer, USBD_TIMEOUT);
+ ohci_timeout_task(addr);
return;
}
- /* Execute the abort in a process context. */
- usb_init_task(&oxfer->xfer.abort_task, ohci_timeout_task, addr,
+ usb_init_task(&xfer->abort_task, ohci_timeout_task, addr,
USB_TASK_TYPE_ABORT);
- usb_add_task(oxfer->xfer.pipe->device, &oxfer->xfer.abort_task);
+ usb_add_task(xfer->device, &xfer->abort_task);
}
void
@@ -1850,7 +1846,7 @@ ohci_timeout_task(void *addr)
struct usbd_xfer *xfer = addr;
int s;
- DPRINTF(("ohci_timeout_task: xfer=%p\n", xfer));
+ DPRINTF(("%s: xfer=%p\n", __func__, xfer));
s = splusb();
ohci_abort_xfer(xfer, USBD_TIMEOUT);
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);