• Michal Nazarewicz's avatar
    USB: f_mass_storage: dynamic buffers for better alignment · aae86e8a
    Michal Nazarewicz authored
    "Static" buffers in fsg_buffhd structure (ie. fields which are arrays
    rather then pointers to dynamically allocated memory) are not aligned
    to any "big" power of two which may lead to poor DMA performance
    (copying "by hand" of head or tail) or no DMA at all even if otherwise
    hardware supports it.
    
    Therefore, this patch makes mass storage function use kmalloc()ed
    buffers which are (because of their size) page aligned (which should
    be enough for any hardware).
    Signed-off-by: default avatarMichal Nazarewicz <m.nazarewicz@samsung.com>
    Cc: Kyungmin Park <kyungmin.park@samsung.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    aae86e8a
f_mass_storage.c 87.7 KB