diff options
| author | mrg <mrg@NetBSD.org> | 2012-07-15 21:13:31 +0000 |
|---|---|---|
| committer | mrg <mrg@NetBSD.org> | 2012-07-15 21:13:31 +0000 |
| commit | 0c0edd664f3fb899052d02d0bb06b19efd1f68db (patch) | |
| tree | 0cf3e4235aae45a1200055232b5c8437959c669a /sys/dev/usb/usb_subr.c | |
| parent | 02a8901fda219c6872fa2a70961bd34d15011bb6 (diff) | |
commit my workaround for PR 46648 for now, as the more involved
fix is not ready yet:
move the clear endpoint stall async call into the task thread,
to avoid trying to call kmem_alloc() from a softint thread.
XXX ideally moving callbacks into the task thread (or perhaps
a different high priority task thread) would be better than this
workaround, once that method is working.
Diffstat (limited to 'sys/dev/usb/usb_subr.c')
| -rw-r--r-- | sys/dev/usb/usb_subr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index c9fc57d663e..c9056c76c02 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: usb_subr.c,v 1.182 2012/06/10 06:15:54 mrg Exp $ */ +/* $NetBSD: usb_subr.c,v 1.183 2012/07/15 21:13:31 mrg Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */ /* @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.182 2012/06/10 06:15:54 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.183 2012/07/15 21:13:31 mrg Exp $"); #include "opt_compat_netbsd.h" #include "opt_usbverbose.h" @@ -765,6 +765,7 @@ usbd_setup_pipe(usbd_device_handle dev, usbd_interface_handle iface, free(p, M_USB); return (err); } + usb_init_task(&p->async_task, usbd_clear_endpoint_stall_async_cb, p); *pipe = p; return (USBD_NORMAL_COMPLETION); } @@ -779,6 +780,7 @@ usbd_kill_pipe(usbd_pipe_handle pipe) usbd_lock_pipe(pipe); pipe->methods->close(pipe); usbd_unlock_pipe(pipe); + usb_rem_task(pipe->device, &pipe->async_task); pipe->endpoint->refcnt--; free(pipe, M_USB); } |
