[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0C18FE92A7765D4EB9EE5D38D86A563A05D30E0C@SHSMSX103.ccr.corp.intel.com>
Date: Thu, 19 May 2016 08:49:57 +0000
From: "Du, Changbin" <changbin.du@...el.com>
To: Michal Nazarewicz <mina86@...a86.com>,
Felipe Balbi <felipe.balbi@...ux.intel.com>,
Alan Stern <stern@...land.harvard.edu>
CC: Al Viro <viro@...iv.linux.org.uk>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"rui.silva@...aro.org" <rui.silva@...aro.org>,
"k.opasiak@...sung.com" <k.opasiak@...sung.com>,
"lars@...afoo.de" <lars@...afoo.de>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] usb: gadget: f_fs: report error if excess data received
Hi,
> > I'd prefer fail the request at all, and it is better done in HW.
> > Because per the USB Spec that device can return NAK if a function was
> > unable to accept data From the host. The DWC3 has not been design as
> > this, if software fail the transfer, it is a little weird for host.
> >
> > So, now we have 3 choices:
> > 1) buffer the excess data
> > 2) fail the transfer
>
> You mean fail when more data has been sent (i.e. drop the whole packet)
> or fail at entry to read() if the buffer is not aligned?
>
I mean the first one.
> > 3) drop the excess data, then print an warning message
> >
> > Which one do you prefer?
>
> I think f_fs should mimic whatever happens if unaligned request is
> queued on dwc3. As far as I understand, this is not 1.
>
> I’ll be travelling again on Friday so I’ll finish up the patch doing 1
> so we will have a choice between 1 (my patch) and 3 (your patch).
>
Great! Prefer your patch if #1 works good.
> --
> Best regards
> ミハウ “𝓶𝓲𝓷𝓪86” ナザレヴイツ
> «If at first you don’t succeed, give up skydiving»
Best Regards,
Du, Changbin
Powered by blists - more mailing lists