mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] f_fs: better handle excess data on read
@ 2016-05-21 18:47 Michal Nazarewicz
  2016-05-21 18:47 ` [PATCH 1/2] usb: gadget: f_fs: printk error when excess data is dropped " Michal Nazarewicz
  2016-05-21 18:47 ` [PATCH 2/2] usb: gadget: f_fs: buffer data from ‘oversized’ OUT requests Michal Nazarewicz
  0 siblings, 2 replies; 3+ messages in thread
From: Michal Nazarewicz @ 2016-05-21 18:47 UTC (permalink / raw)
  To: Felipe Balbi, Du, Changbin
  Cc: Greg Kroah-Hartman, Al Viro, rui.silva, k.opasiak, lars,
	linux-kernel, linux-usb

Between this set and Du, Changbin’s patch, we now have implementation
for the following three possibilities to choose from:
1. Buffer excess data (this whole patch set).
2. Fail the transfer (Du, Changbin’s patch).
3. Drop excess data (the first patch from this set).

As per earlier comments, I think 3. is the correct, i.e. the second
patch should not be ocmmited because:
* it complicates the code,
* doesn’t handle AIO anyway,
* introduces weird behaviours when partial read happens just before
  endpoint is disabled (we may end up silently dropping excess data
  anyway),
* goes beyond what UDC does and
* breaks one read -> one request model which has been true so far.

Michal Nazarewicz (2):
  usb: gadget: f_fs: printk error when excess data is dropped on read
  usb: gadget: f_fs: buffer data from ‘oversized’ OUT requests

 drivers/usb/gadget/function/f_fs.c | 179 ++++++++++++++++++++++++++++++-------
 1 file changed, 145 insertions(+), 34 deletions(-)

-- 
Best regards
ミハウ “𝓶𝓲𝓷𝓪86” ナザレヴイツ
«If at first you don’t succeed, give up skydiving»

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-21 18:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-21 18:47 [PATCH 0/2] f_fs: better handle excess data on read Michal Nazarewicz
2016-05-21 18:47 ` [PATCH 1/2] usb: gadget: f_fs: printk error when excess data is dropped " Michal Nazarewicz
2016-05-21 18:47 ` [PATCH 2/2] usb: gadget: f_fs: buffer data from ‘oversized’ OUT requests Michal Nazarewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®