• J
    usb: gadget: ffs: handle I/O completion in-order · addfc582
    John Keeping 提交于
    By submitting completed transfers to the system workqueue there is no
    guarantee that completion events will be queued up in the correct order,
    as in multi-processor systems there is a thread running for each
    processor and the work items are not bound to a particular core.
    
    This means that several completions are in the queue at the same time,
    they may be processed in parallel and complete out of order, resulting
    in data appearing corrupt when read by userspace.
    
    Create a single-threaded workqueue for FunctionFS so that data completed
    requests is passed to userspace in the order in which they complete.
    Acked-by: NMichal Nazarewicz <mina86@mina86.com>
    Signed-off-by: NJohn Keeping <john@metanate.com>
    Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
    addfc582
f_fs.c 87.4 KB