1. 06 3月, 2014 19 次提交
  2. 05 3月, 2014 13 次提交
  3. 20 2月, 2014 5 次提交
  4. 19 2月, 2014 3 次提交
    • R
      usb: gadget: f_fs: add aio support · 2e4c7553
      Robert Baldyga 提交于
      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: NRobert Baldyga <r.baldyga@samsung.com>
      Acked-by: NMichal Nazarewicz <mina86@mina86.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      2e4c7553
    • R
      usb: gadget: f_fs: add poll for endpoint 0 · 23de91e9
      Robert Baldyga 提交于
      This patch adds poll function for file representing ep0.
      
      Ability of read from or write to ep0 file is related with actual state of ffs:
      - When desctiptors or strings are not written yet, POLLOUT flag is set.
      - If there is any event to read, POLLIN flag is set.
      - If setup request was read, POLLIN and POLLOUT flag is set, to allow
        send response (by performing I/O operation consistent with setup request
        direction) or set stall (by performing I/O operation opposite  setup
        request direction).
      Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com>
      Acked-by: NMichal Nazarewicz <mina86@mina86.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      23de91e9
    • R
      usb: gadget: f_fs: fix setup request handling · 0a7b1f8a
      Robert Baldyga 提交于
      This patch fixes __ffs_ep0_queue_wait() function, which now returns number of
      bytes transferred in USB request or error code in case of failure. This is
      needed by ffs_ep0_read() function, when read data is copied to userspace.
      
      It also cleans up code by removing usused variable ep0req_status.
      Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com>
      Acked-by: NMichal Nazarewicz <mina86@mina86.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      0a7b1f8a