[PATCH] USB: gadgetfs AIO support
This patch adds AIO support to gadgetfs, letting user mode programs use "libaio" to manage USB I/O concurrency with the same API as they may already be using for disk files. In particular, it's practical to stream isochronous data to/from userspace using this API, by keeping an endpoint's I/O queue from emptying. Each AIO "iocb" in userspace corresponds directly to one "usb_request" (and one kiocb) in the kernel. Their lifecycles, including cancelation, overlap completely. That's much of why the patch is so small (surprised the heck out of me!); that, and using copy_{to,from}_user() rather than trying fancy dma mapping tricks to attain zerocopy nirvana. The kernel AIO module forgot to export kick_iocb(), so this adds the missing declaration ... needed when using gadgetfs as a module. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Showing
Please register or sign in to comment