summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/ehci.c18
-rw-r--r--sys/dev/usb/ehcivar.h3
-rw-r--r--sys/dev/usb/ohci.c15
-rw-r--r--sys/dev/usb/ohcivar.h3
-rw-r--r--sys/dev/usb/uhci.c12
-rw-r--r--sys/dev/usb/uhcivar.h3
-rw-r--r--sys/dev/usb/usbdivar.h3
7 files changed, 26 insertions, 31 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c
index da5b2f94162..e69ebb9abe5 100644
--- a/sys/dev/usb/ehci.c
+++ b/sys/dev/usb/ehci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ehci.c,v 1.134 2013/06/12 11:42:01 mpi Exp $ */
+/* $OpenBSD: ehci.c,v 1.135 2013/11/01 12:00:53 mpi Exp $ */
/* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */
/*
@@ -740,7 +740,7 @@ ehci_check_qh_intr(struct ehci_softc *sc, struct ehci_xfer *ex)
done:
DPRINTFN(12, ("ehci_check_intr: ex=%p done\n", ex));
timeout_del(&ex->xfer.timeout_handle);
- usb_rem_task(ex->xfer.pipe->device, &ex->abort_task);
+ usb_rem_task(ex->xfer.pipe->device, &ex->xfer.abort_task);
ehci_idone(ex);
}
@@ -788,7 +788,7 @@ ehci_check_itd_intr(struct ehci_softc *sc, struct ehci_xfer *ex) {
done:
DPRINTFN(12, ("ehci_check_itd_intr: ex=%p done\n", ex));
timeout_del(&ex->xfer.timeout_handle);
- usb_rem_task(ex->xfer.pipe->device, &ex->abort_task);
+ usb_rem_task(ex->xfer.pipe->device, &ex->xfer.abort_task);
ehci_idone(ex);
}
@@ -1182,7 +1182,7 @@ 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,
+ usb_init_task(&xfer->abort_task, ehci_timeout_task,
xfer, USB_TASK_TYPE_ABORT);
EXFER(xfer)->ehci_xfer_flags = 0;
#ifdef DIAGNOSTIC
@@ -2742,7 +2742,7 @@ ehci_abort_xfer(struct usbd_xfer *xfer, usbd_status status)
s = splusb();
xfer->status = status; /* make software ignore it */
timeout_del(&xfer->timeout_handle);
- usb_rem_task(epipe->pipe.device, &exfer->abort_task);
+ usb_rem_task(epipe->pipe.device, &xfer->abort_task);
usb_transfer_complete(xfer);
splx(s);
return;
@@ -2776,7 +2776,7 @@ ehci_abort_xfer(struct usbd_xfer *xfer, usbd_status status)
exfer->ehci_xfer_flags |= EHCI_XFER_ABORTING;
xfer->status = status; /* make software ignore it */
timeout_del(&xfer->timeout_handle);
- usb_rem_task(epipe->pipe.device, &exfer->abort_task);
+ usb_rem_task(epipe->pipe.device, &xfer->abort_task);
splx(s);
/*
@@ -2852,7 +2852,7 @@ ehci_abort_isoc_xfer(struct usbd_xfer *xfer, usbd_status status)
s = splusb();
xfer->status = status;
timeout_del(&xfer->timeout_handle);
- usb_rem_task(epipe->pipe.device, &exfer->abort_task);
+ usb_rem_task(epipe->pipe.device, &xfer->abort_task);
usb_transfer_complete(xfer);
splx(s);
return;
@@ -2877,7 +2877,7 @@ ehci_abort_isoc_xfer(struct usbd_xfer *xfer, usbd_status status)
xfer->status = status;
timeout_del(&xfer->timeout_handle);
- usb_rem_task(epipe->pipe.device, &exfer->abort_task);
+ usb_rem_task(epipe->pipe.device, &xfer->abort_task);
s = splusb();
for (itd = exfer->itdstart; itd != NULL; itd = itd->xfer_next) {
@@ -2926,7 +2926,7 @@ ehci_timeout(void *addr)
}
/* Execute the abort in a process context. */
- usb_add_task(exfer->xfer.pipe->device, &exfer->abort_task);
+ usb_add_task(exfer->xfer.pipe->device, &exfer->xfer.abort_task);
}
void
diff --git a/sys/dev/usb/ehcivar.h b/sys/dev/usb/ehcivar.h
index 12d1f8ec846..3e9d2c716de 100644
--- a/sys/dev/usb/ehcivar.h
+++ b/sys/dev/usb/ehcivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ehcivar.h,v 1.26 2013/06/12 11:42:01 mpi Exp $ */
+/* $OpenBSD: ehcivar.h,v 1.27 2013/11/01 12:00:54 mpi Exp $ */
/* $NetBSD: ehcivar.h,v 1.19 2005/04/29 15:04:29 augustss Exp $ */
/*
@@ -78,7 +78,6 @@ struct ehci_soft_itd {
struct ehci_xfer {
struct usbd_xfer xfer;
- struct usb_task abort_task;
TAILQ_ENTRY(ehci_xfer) inext; /* list of active xfers */
struct ehci_soft_qtd *sqtdstart;
struct ehci_soft_qtd *sqtdend;
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index f84fc8739af..b71cfdfa834 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohci.c,v 1.114 2013/06/25 09:24:34 mpi Exp $ */
+/* $OpenBSD: ohci.c,v 1.115 2013/11/01 12:00:54 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 $ */
@@ -1305,8 +1305,7 @@ ohci_softintr(void *v)
continue;
}
timeout_del(&xfer->timeout_handle);
- usb_rem_task(xfer->pipe->device,
- &((struct ohci_xfer *)xfer)->abort_task);
+ usb_rem_task(xfer->pipe->device, &xfer->abort_task);
len = std->len;
if (std->td.td_cbp != 0)
@@ -1858,9 +1857,9 @@ ohci_timeout(void *addr)
}
/* Execute the abort in a process context. */
- usb_init_task(&oxfer->abort_task, ohci_timeout_task, addr,
+ usb_init_task(&oxfer->xfer.abort_task, ohci_timeout_task, addr,
USB_TASK_TYPE_ABORT);
- usb_add_task(oxfer->xfer.pipe->device, &oxfer->abort_task);
+ usb_add_task(oxfer->xfer.pipe->device, &oxfer->xfer.abort_task);
}
void
@@ -2143,8 +2142,7 @@ ohci_abort_xfer(struct usbd_xfer *xfer, usbd_status status)
s = splusb();
xfer->status = status; /* make software ignore it */
timeout_del(&xfer->timeout_handle);
- usb_rem_task(xfer->pipe->device,
- &((struct ohci_xfer *)xfer)->abort_task);
+ usb_rem_task(xfer->pipe->device, &xfer->abort_task);
usb_transfer_complete(xfer);
splx(s);
return;
@@ -2159,8 +2157,7 @@ ohci_abort_xfer(struct usbd_xfer *xfer, usbd_status status)
s = splusb();
xfer->status = status; /* make software ignore it */
timeout_del(&xfer->timeout_handle);
- usb_rem_task(xfer->pipe->device,
- &((struct ohci_xfer *)xfer)->abort_task);
+ usb_rem_task(xfer->pipe->device, &xfer->abort_task);
splx(s);
DPRINTFN(1,("ohci_abort_xfer: stop ed=%p\n", sed));
sed->ed.ed_flags |= htole32(OHCI_ED_SKIP); /* force hardware skip */
diff --git a/sys/dev/usb/ohcivar.h b/sys/dev/usb/ohcivar.h
index 75eed0dc095..755e5ecdb91 100644
--- a/sys/dev/usb/ohcivar.h
+++ b/sys/dev/usb/ohcivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohcivar.h,v 1.33 2013/05/30 16:15:02 deraadt Exp $ */
+/* $OpenBSD: ohcivar.h,v 1.34 2013/11/01 12:00:54 mpi Exp $ */
/* $NetBSD: ohcivar.h,v 1.32 2003/02/22 05:24:17 tsutsui Exp $ */
/* $FreeBSD: src/sys/dev/usb/ohcivar.h,v 1.13 1999/11/17 22:33:41 n_hibma Exp $ */
@@ -130,7 +130,6 @@ struct ohci_softc {
struct ohci_xfer {
struct usbd_xfer xfer;
- struct usb_task abort_task;
};
usbd_status ohci_checkrev(struct ohci_softc *);
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c
index ab345c2cbc5..aa040bfd79a 100644
--- a/sys/dev/usb/uhci.c
+++ b/sys/dev/usb/uhci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhci.c,v 1.99 2013/06/25 09:24:34 mpi Exp $ */
+/* $OpenBSD: uhci.c,v 1.100 2013/11/01 12:00:54 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 $ */
@@ -1253,7 +1253,7 @@ uhci_check_intr(struct uhci_softc *sc, struct uhci_intr_info *ii)
done:
DPRINTFN(12, ("uhci_check_intr: ii=%p done\n", ii));
timeout_del(&ii->xfer->timeout_handle);
- usb_rem_task(ii->xfer->pipe->device, &UXFER(ii->xfer)->abort_task);
+ usb_rem_task(ii->xfer->pipe->device, &ii->xfer->abort_task);
uhci_idone(ii);
}
@@ -1402,9 +1402,9 @@ uhci_timeout(void *addr)
}
/* Execute the abort in a process context. */
- usb_init_task(&uxfer->abort_task, uhci_timeout_task, ii->xfer,
+ usb_init_task(&ii->xfer->abort_task, uhci_timeout_task, ii->xfer,
USB_TASK_TYPE_ABORT);
- usb_add_task(uxfer->xfer.pipe->device, &uxfer->abort_task);
+ usb_add_task(uxfer->xfer.pipe->device, &ii->xfer->abort_task);
}
void
@@ -1843,7 +1843,7 @@ uhci_abort_xfer(struct usbd_xfer *xfer, usbd_status status)
s = splusb();
xfer->status = status; /* make software ignore it */
timeout_del(&xfer->timeout_handle);
- usb_rem_task(xfer->pipe->device, &UXFER(xfer)->abort_task);
+ usb_rem_task(xfer->pipe->device, &xfer->abort_task);
usb_transfer_complete(xfer);
splx(s);
return;
@@ -1858,7 +1858,7 @@ uhci_abort_xfer(struct usbd_xfer *xfer, usbd_status status)
s = splusb();
xfer->status = status; /* make software ignore it */
timeout_del(&xfer->timeout_handle);
- usb_rem_task(xfer->pipe->device, &UXFER(xfer)->abort_task);
+ usb_rem_task(xfer->pipe->device, &xfer->abort_task);
DPRINTFN(1,("uhci_abort_xfer: stop ii=%p\n", ii));
for (std = ii->stdstart; std != NULL; std = std->link.std)
std->td.td_status &= htole32(~(UHCI_TD_ACTIVE | UHCI_TD_IOC));
diff --git a/sys/dev/usb/uhcivar.h b/sys/dev/usb/uhcivar.h
index 9205b58d639..6acccfb0a2d 100644
--- a/sys/dev/usb/uhcivar.h
+++ b/sys/dev/usb/uhcivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhcivar.h,v 1.26 2013/05/30 16:15:02 deraadt Exp $ */
+/* $OpenBSD: uhcivar.h,v 1.27 2013/11/01 12:00:54 mpi Exp $ */
/* $NetBSD: uhcivar.h,v 1.36 2002/12/31 00:39:11 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhcivar.h,v 1.14 1999/11/17 22:33:42 n_hibma Exp $ */
@@ -77,7 +77,6 @@ struct uhci_intr_info {
struct uhci_xfer {
struct usbd_xfer xfer;
struct uhci_intr_info iinfo;
- struct usb_task abort_task;
int curframe;
};
diff --git a/sys/dev/usb/usbdivar.h b/sys/dev/usb/usbdivar.h
index 34428f10727..19546697e19 100644
--- a/sys/dev/usb/usbdivar.h
+++ b/sys/dev/usb/usbdivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbdivar.h,v 1.52 2013/10/19 08:29:30 mpi Exp $ */
+/* $OpenBSD: usbdivar.h,v 1.53 2013/11/01 12:00:54 mpi Exp $ */
/* $NetBSD: usbdivar.h,v 1.70 2002/07/11 21:14:36 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdivar.h,v 1.11 1999/11/17 22:33:51 n_hibma Exp $ */
@@ -210,6 +210,7 @@ struct usbd_xfer {
void *hcpriv; /* private use by the HC driver */
+ struct usb_task abort_task;
struct timeout timeout_handle;
};