summaryrefslogtreecommitdiff
path: root/sys/dev/usb/ohci.c
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2010-10-23 15:42:11 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2010-10-23 15:42:11 +0000
commit8e12f85560fc6cbe21ee1d99ef2a764d08702ed2 (patch)
treeb9bbbae0787b3b58b834bb8bac476ea50fe8f4a2 /sys/dev/usb/ohci.c
parent645084637a0c51eccc7292eb827eb5f5294adac8 (diff)
create another kthread to run xfer abort tasks. xfer abort tasks cannot
be run from the generic task kthread, because xfers that need to be aborted block newly queued tasks from running (i.e. the xfer to be aborted blocks the abort of that task). as there are now three types of usb tasks, add an argument to usb_init_task() and another member to struct usb_task to specify the task type. fixes boot hangs that are showing up because we now use usb tasks to attach/detach usb devices.
Diffstat (limited to 'sys/dev/usb/ohci.c')
-rw-r--r--sys/dev/usb/ohci.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index fa543d0fe29..5b1c1544ccd 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohci.c,v 1.99 2010/09/07 16:21:46 deraadt Exp $ */
+/* $OpenBSD: ohci.c,v 1.100 2010/10/23 15:42:09 jakemsr 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 $ */
@@ -1894,7 +1894,8 @@ 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->abort_task, ohci_timeout_task, addr,
+ USB_TASK_TYPE_ABORT);
usb_add_task(oxfer->xfer.pipe->device, &oxfer->abort_task);
}