diff options
author | 2010-10-23 15:42:09 +0000 | |
---|---|---|
committer | 2010-10-23 15:42:09 +0000 | |
commit | c33449aa8264106b22d14984289cf902a7661815 (patch) | |
tree | 050262ee23fea6e0c41a6c376d00c28b05dfad04 /sys/dev/usb/if_url.c | |
parent | remove PFR_FLAG_ATOMIC. not used, and doesn't work as advertised. (diff) | |
download | wireguard-openbsd-c33449aa8264106b22d14984289cf902a7661815.tar.xz wireguard-openbsd-c33449aa8264106b22d14984289cf902a7661815.zip |
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_url.c')
-rw-r--r-- | sys/dev/usb/if_url.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c index 8e4ea55b2c0..42fe68d4111 100644 --- a/sys/dev/usb/if_url.c +++ b/sys/dev/usb/if_url.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_url.c,v 1.56 2010/08/27 07:08:22 deraadt Exp $ */ +/* $OpenBSD: if_url.c,v 1.57 2010/10/23 15:42:09 jakemsr Exp $ */ /* $NetBSD: if_url.c,v 1.6 2002/09/29 10:19:21 martin Exp $ */ /* * Copyright (c) 2001, 2002 @@ -208,9 +208,11 @@ url_attach(struct device *parent, struct device *self, void *aux) goto bad; } - usb_init_task(&sc->sc_tick_task, url_tick_task, sc); + usb_init_task(&sc->sc_tick_task, url_tick_task, sc, + USB_TASK_TYPE_GENERIC); rw_init(&sc->sc_mii_lock, "urlmii"); - usb_init_task(&sc->sc_stop_task, (void (*)(void *)) url_stop_task, sc); + usb_init_task(&sc->sc_stop_task, (void (*)(void *)) url_stop_task, sc, + USB_TASK_TYPE_GENERIC); /* get control interface */ err = usbd_device2interface_handle(dev, URL_IFACE_INDEX, &iface); |