]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: f_fs: buffer data from ‘oversized’ OUT requests
authorMichal Nazarewicz <mina86@mina86.com>
Sat, 21 May 2016 18:47:35 +0000 (20:47 +0200)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 21 Jun 2016 08:11:31 +0000 (11:11 +0300)
commit3c9a63b376ecc7dabeab1cdb0625b60e2d6caa7b
treebcb04f4d191a444798af2e2847e3096e8a31ce4e
parente14b475e4e6e508eb5cde7540aa3f9b673be6cf0
usb: gadget: f_fs: buffer data from ‘oversized’ OUT requests

f_fs rounds up read(2) requests to a multiple of a max packet size
which means that host may provide more data than user has space for.
So far, the excess data has been silently ignored.

This introduces a buffer for a tail of such requests so that they are
returned on next read instead of being ignored.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/function/f_fs.c