summaryrefslogtreecommitdiff
path: root/sys/dev/usb/udcf.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/udcf.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/udcf.c')
-rw-r--r--sys/dev/usb/udcf.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/dev/usb/udcf.c b/sys/dev/usb/udcf.c
index 81947e31097..6716aa390d8 100644
--- a/sys/dev/usb/udcf.c
+++ b/sys/dev/usb/udcf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udcf.c,v 1.48 2010/09/24 08:33:59 yuo Exp $ */
+/* $OpenBSD: udcf.c,v 1.49 2010/10/23 15:42:09 jakemsr Exp $ */
/*
* Copyright (c) 2006, 2007, 2008 Marc Balmer <mbalmer@openbsd.org>
@@ -206,10 +206,10 @@ udcf_attach(struct device *parent, struct device *self, void *aux)
break;
}
- usb_init_task(&sc->sc_task, udcf_probe, sc);
- usb_init_task(&sc->sc_bv_task, udcf_bv_probe, sc);
- usb_init_task(&sc->sc_mg_task, udcf_mg_probe, sc);
- usb_init_task(&sc->sc_sl_task, udcf_sl_probe, sc);
+ usb_init_task(&sc->sc_task, udcf_probe, sc, USB_TASK_TYPE_GENERIC);
+ usb_init_task(&sc->sc_bv_task, udcf_bv_probe, sc, USB_TASK_TYPE_GENERIC);
+ usb_init_task(&sc->sc_mg_task, udcf_mg_probe, sc, USB_TASK_TYPE_GENERIC);
+ usb_init_task(&sc->sc_sl_task, udcf_sl_probe, sc, USB_TASK_TYPE_GENERIC);
timeout_set(&sc->sc_to, udcf_intr, sc);
timeout_set(&sc->sc_bv_to, udcf_bv_intr, sc);
@@ -218,7 +218,8 @@ udcf_attach(struct device *parent, struct device *self, void *aux)
timeout_set(&sc->sc_it_to, udcf_it_intr, sc);
if (sc->sc_detect_ct) {
- usb_init_task(&sc->sc_ct_task, udcf_ct_probe, sc);
+ usb_init_task(&sc->sc_ct_task, udcf_ct_probe, sc,
+ USB_TASK_TYPE_GENERIC);
timeout_set(&sc->sc_ct_to, udcf_ct_intr, sc);
}
strlcpy(sc->sc_sensordev.xname, sc->sc_dev.dv_xname,