Skip to content
  • John Keeping's avatar
    usb: gadget: ffs: handle I/O completion in-order · addfc582
    John Keeping authored
    
    
    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: default avatarMichal Nazarewicz <mina86@mina86.com>
    Signed-off-by: default avatarJohn Keeping <john@metanate.com>
    Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
    addfc582