• Andrzej Pietrasiewicz's avatar
    usb: gadget: f_fs: Allow scatter-gather buffers · 772a7a72
    Andrzej Pietrasiewicz authored
    Some protocols implemented in userspace with FunctionFS might require large
    buffers, e.g. 64kB or more. Currently the said memory is allocated with
    kmalloc, which might fail should system memory be highly fragmented.
    
    On the other hand, some UDC hardware allows scatter-gather operation and
    this patch takes advantage of this capability: if the requested buffer
    is larger than PAGE_SIZE and the UDC allows scatter-gather operation, then
    the buffer is allocated with vmalloc and a scatterlist describing it is
    created and passed to usb request.
    Signed-off-by: default avatarAndrzej Pietrasiewicz <andrzej.p@samsung.com>
    Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
    772a7a72
f_fs.c 89.6 KB