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_axe.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_axe.c')
-rw-r--r-- | sys/dev/usb/if_axe.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c index bbb136cd385..3d8fe570ab0 100644 --- a/sys/dev/usb/if_axe.c +++ b/sys/dev/usb/if_axe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_axe.c,v 1.99 2010/09/24 03:21:21 deraadt Exp $ */ +/* $OpenBSD: if_axe.c,v 1.100 2010/10/23 15:42:09 jakemsr Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Jonathan Gray <jsg@openbsd.org> @@ -676,9 +676,11 @@ axe_attach(struct device *parent, struct device *self, void *aux) sc->axe_flags = axe_lookup(uaa->vendor, uaa->product)->axe_flags; - usb_init_task(&sc->axe_tick_task, axe_tick_task, sc); + usb_init_task(&sc->axe_tick_task, axe_tick_task, sc, + USB_TASK_TYPE_GENERIC); rw_init(&sc->axe_mii_lock, "axemii"); - usb_init_task(&sc->axe_stop_task, (void (*)(void *))axe_stop, sc); + usb_init_task(&sc->axe_stop_task, (void (*)(void *))axe_stop, sc, + USB_TASK_TYPE_GENERIC); err = usbd_device2interface_handle(dev, AXE_IFACE_IDX, &sc->axe_iface); if (err) { |