diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2010-10-23 15:42:11 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2010-10-23 15:42:11 +0000 |
commit | 8e12f85560fc6cbe21ee1d99ef2a764d08702ed2 (patch) | |
tree | b9bbbae0787b3b58b834bb8bac476ea50fe8f4a2 /sys/dev/usb/if_cue.c | |
parent | 645084637a0c51eccc7292eb827eb5f5294adac8 (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/if_cue.c')
-rw-r--r-- | sys/dev/usb/if_cue.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c index 5a964f6c539..ddfc87d8aed 100644 --- a/sys/dev/usb/if_cue.c +++ b/sys/dev/usb/if_cue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cue.c,v 1.53 2010/09/24 08:33:58 yuo Exp $ */ +/* $OpenBSD: if_cue.c,v 1.54 2010/10/23 15:42:09 jakemsr Exp $ */ /* $NetBSD: if_cue.c,v 1.40 2002/07/11 21:14:26 augustss Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -470,8 +470,10 @@ cue_attach(struct device *parent, struct device *self, void *aux) sc->cue_product = uaa->product; sc->cue_vendor = uaa->vendor; - usb_init_task(&sc->cue_tick_task, cue_tick_task, sc); - usb_init_task(&sc->cue_stop_task, (void (*)(void *))cue_stop, sc); + usb_init_task(&sc->cue_tick_task, cue_tick_task, sc, + USB_TASK_TYPE_GENERIC); + usb_init_task(&sc->cue_stop_task, (void (*)(void *))cue_stop, sc, + USB_TASK_TYPE_GENERIC); err = usbd_device2interface_handle(dev, CUE_IFACE_IDX, &iface); if (err) { |