summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/atmel_usba_udc.c
diff options
context:
space:
mode:
authorRobert Baldyga <r.baldyga@samsung.com>2014-02-10 10:42:44 +0100
committerFelipe Balbi <balbi@ti.com>2014-02-18 10:53:02 -0600
commit2e4c7553cd6f9c68bb741582dcb614edcbeca70f (patch)
treeb4c5b2066d145eb224809b32b585fde8424f5f87 /drivers/usb/gadget/atmel_usba_udc.c
parent23de91e970a410a30b5927b9a749ed1dfd914140 (diff)
downloadlwn-2e4c7553cd6f9c68bb741582dcb614edcbeca70f.tar.gz
lwn-2e4c7553cd6f9c68bb741582dcb614edcbeca70f.zip
usb: gadget: f_fs: add aio support
This patch adds asynchronous I/O support for FunctionFS endpoint files. It adds ffs_epfile_aio_write() and ffs_epfile_aio_read() functions responsible for preparing AIO operations. It also modifies ffs_epfile_io() function, adding aio handling code. Instead of extending list of parameters of this function, there is new struct ffs_io_data which contains all information needed to perform I/O operation. Pointer to this struct replaces "buf" and "len" parameters of ffs_epfile_io() function. Allocated buffer is freed immediately only after sync operation, because in async IO it's freed in complete funcion. For each async operation an USB request is allocated, because it allows to have more than one request queued on single endpoint. According to changes in ffs_epfile_io() function, functions ffs_epfile_write() and ffs_epfile_read() are updated to use new API. For asynchronous I/O operations there is new request complete function named ffs_epfile_async_io_complete(), which completes AIO operation, and frees used memory. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/atmel_usba_udc.c')
0 files changed, 0 insertions, 0 deletions