Re: [PATCHv2 2/2] check quirk to pad epout buf size when not aligned to maxpacketsize

2013-11-13 Thread David Cohen
On 11/13/2013 07:52 AM, Alan Stern wrote: On Tue, 12 Nov 2013, Paul Zimmerman wrote: @@ -824,7 +832,7 @@ static ssize_t ffs_epfile_io(struct file *file, req->context = &done; req->complete = ffs_epfile_io_complete; req->buf = data; -

RE: [PATCHv2 2/2] check quirk to pad epout buf size when not aligned to maxpacketsize

2013-11-13 Thread Alan Stern
On Tue, 12 Nov 2013, Paul Zimmerman wrote: > > > >>> @@ -824,7 +832,7 @@ static ssize_t ffs_epfile_io(struct file *file, > > > >>> req->context = &done; > > > >>> req->complete = ffs_epfile_io_complete; > > > >>> req->buf = data; > > > >>> -

RE: [PATCHv2 2/2] check quirk to pad epout buf size when not aligned to maxpacketsize

2013-11-12 Thread Paul Zimmerman
> From: David Cohen [mailto:david.a.co...@linux.intel.com] > Sent: Tuesday, November 12, 2013 3:44 PM > > On 11/12/2013 03:09 PM, Paul Zimmerman wrote: > > >> From: linux-usb-ow...@vger.kernel.org > >> [mailto:linux-usb-ow...@vger.kernel.org] On Behalf Of Alan Stern > >> Sent: Tuesday, November

Re: [PATCHv2 2/2] check quirk to pad epout buf size when not aligned to maxpacketsize

2013-11-12 Thread David Cohen
Hi Paul, On 11/12/2013 03:09 PM, Paul Zimmerman wrote: From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb-ow...@vger.kernel.org] On Behalf Of Alan Stern Sent: Tuesday, November 12, 2013 7:51 AM On Mon, 11 Nov 2013, David Cohen wrote: Hi Alan, Michal, On 11/11/2013 01:09 PM, Michal Naza

RE: [PATCHv2 2/2] check quirk to pad epout buf size when not aligned to maxpacketsize

2013-11-12 Thread Paul Zimmerman
> From: linux-usb-ow...@vger.kernel.org > [mailto:linux-usb-ow...@vger.kernel.org] On Behalf Of Alan Stern > Sent: Tuesday, November 12, 2013 7:51 AM > > On Mon, 11 Nov 2013, David Cohen wrote: > > > Hi Alan, Michal, > > > > On 11/11/2013 01:09 PM, Michal Nazarewicz wrote: > > > On Mon, Nov 11 2

Re: [PATCHv2 2/2] check quirk to pad epout buf size when not aligned to maxpacketsize

2013-11-12 Thread David Cohen
IIUC, req->length should still be set to len, not to data_len. >> >> I misunderstood the first time I read it: >> In order to avoid DWC3 to stall, we need to update req->length (this is >> the most important fix). kmalloc() is updated too to prevent USB >> controller to overflow buffer boundar

Re: [PATCHv2 2/2] check quirk to pad epout buf size when not aligned to maxpacketsize

2013-11-12 Thread Alan Stern
On Mon, 11 Nov 2013, David Cohen wrote: > Hi Alan, Michal, > > On 11/11/2013 01:09 PM, Michal Nazarewicz wrote: > > On Mon, Nov 11 2013, Alan Stern wrote: > >> On Mon, 11 Nov 2013, Michal Nazarewicz wrote: > >> > >>> Check gadget.quirk_ep_out_aligned_size to decide if buffer size requires > >>> t

Re: [PATCHv2 2/2] check quirk to pad epout buf size when not aligned to maxpacketsize

2013-11-11 Thread David Cohen
On 11/11/2013 03:21 AM, Michal Nazarewicz wrote: Check gadget.quirk_ep_out_aligned_size to decide if buffer size requires to be aligned to maxpacketsize of an out endpoint. ffs_epfile_io() needs to pad epout buffer to match above condition if quirk is found. Signed-off-by: Michal Nazarewicz --

Re: [PATCHv2 2/2] check quirk to pad epout buf size when not aligned to maxpacketsize

2013-11-11 Thread David Cohen
Hi Alan, Michal, On 11/11/2013 01:09 PM, Michal Nazarewicz wrote: On Mon, Nov 11 2013, Alan Stern wrote: On Mon, 11 Nov 2013, Michal Nazarewicz wrote: Check gadget.quirk_ep_out_aligned_size to decide if buffer size requires to be aligned to maxpacketsize of an out endpoint. ffs_epfile_io() n

Re: [PATCHv2 2/2] check quirk to pad epout buf size when not aligned to maxpacketsize

2013-11-11 Thread Michal Nazarewicz
On Mon, Nov 11 2013, David Cohen wrote: > But the whole series became messy with too many amends. If you don't > mind, I'll send a v5 of my patch set including my v4.1 patches + your 2 > ones following the correct sequence. Please do, but as Alan pointed out my second patch needs some fixes, name

Re: [PATCHv2 2/2] check quirk to pad epout buf size when not aligned to maxpacketsize

2013-11-11 Thread Michal Nazarewicz
On Mon, Nov 11 2013, Alan Stern wrote: > On Mon, 11 Nov 2013, Michal Nazarewicz wrote: > >> Check gadget.quirk_ep_out_aligned_size to decide if buffer size requires >> to be aligned to maxpacketsize of an out endpoint. ffs_epfile_io() needs >> to pad epout buffer to match above condition if quirk

Re: [PATCHv2 2/2] check quirk to pad epout buf size when not aligned to maxpacketsize

2013-11-11 Thread Alan Stern
On Mon, 11 Nov 2013, Michal Nazarewicz wrote: > Check gadget.quirk_ep_out_aligned_size to decide if buffer size requires > to be aligned to maxpacketsize of an out endpoint. ffs_epfile_io() needs > to pad epout buffer to match above condition if quirk is found. > > Signed-off-by: Michal Nazarewi

Re: [PATCHv2 2/2] check quirk to pad epout buf size when not aligned to maxpacketsize

2013-11-11 Thread David Cohen
On 11/11/2013 03:21 AM, Michal Nazarewicz wrote: Check gadget.quirk_ep_out_aligned_size to decide if buffer size requires to be aligned to maxpacketsize of an out endpoint. ffs_epfile_io() needs to pad epout buffer to match above condition if quirk is found. Signed-off-by: Michal Nazarewicz --