Re: [PATCH 22/22] usb: document that URB transfer_buffer should be aligned

2017-03-31 Thread Alan Stern
On Thu, 30 Mar 2017, Oliver Neukum wrote: > Am Donnerstag, den 30.03.2017, 11:55 -0400 schrieb Alan Stern: > > > > I'm pretty sure that usb-storage does not do this, at least, not when > > operating in its normal Bulk-Only-Transport mode.  It never tries to > > read the results of an earlier

Re: [PATCH 22/22] usb: document that URB transfer_buffer should be aligned

2017-03-30 Thread Oliver Neukum
Am Donnerstag, den 30.03.2017, 11:55 -0400 schrieb Alan Stern: > > I'm pretty sure that usb-storage does not do this, at least, not when > operating in its normal Bulk-Only-Transport mode.  It never tries to > read the results of an earlier transfer after carrying out a later > transfer to any

Re: [PATCH 22/22] usb: document that URB transfer_buffer should be aligned

2017-03-30 Thread Laurent Pinchart
Hi Alan, On Thursday 30 Mar 2017 11:55:18 Alan Stern wrote: > On Thu, 30 Mar 2017, Mauro Carvalho Chehab wrote: > > Em Thu, 30 Mar 2017 10:26:32 -0400 (EDT) Alan Stern escreveu: > >> On Thu, 30 Mar 2017, Oliver Neukum wrote: > Btw, I'm a lot more concerned about USB storage drivers. When I

Re: [PATCH 22/22] usb: document that URB transfer_buffer should be aligned

2017-03-30 Thread Alan Stern
On Thu, 30 Mar 2017, Mauro Carvalho Chehab wrote: > Em Thu, 30 Mar 2017 10:26:32 -0400 (EDT) > Alan Stern escreveu: > > > On Thu, 30 Mar 2017, Oliver Neukum wrote: > > > > > > Btw, I'm a lot more concerned about USB storage drivers. When I was > > > > discussing

Re: [PATCH 22/22] usb: document that URB transfer_buffer should be aligned

2017-03-30 Thread Mauro Carvalho Chehab
Em Thu, 30 Mar 2017 10:26:32 -0400 (EDT) Alan Stern escreveu: > On Thu, 30 Mar 2017, Oliver Neukum wrote: > > > > Btw, I'm a lot more concerned about USB storage drivers. When I was > > > discussing about this issue at the #raspberrypi-devel IRC channel, > > > someone

Re: [PATCH 22/22] usb: document that URB transfer_buffer should be aligned

2017-03-30 Thread Alan Stern
On Thu, 30 Mar 2017, Oliver Neukum wrote: > > Btw, I'm a lot more concerned about USB storage drivers. When I was > > discussing about this issue at the #raspberrypi-devel IRC channel, > > someone complained that, after switching from the RPi downstream Kernel > > to upstream, his USB data

Re: [PATCH 22/22] usb: document that URB transfer_buffer should be aligned

2017-03-30 Thread Oliver Neukum
Am Donnerstag, den 30.03.2017, 07:28 -0300 schrieb Mauro Carvalho Chehab: > Em Thu, 30 Mar 2017 12:34:32 +0300 > Laurent Pinchart escreveu: > > > Hi, > > > That effectively changes the API. Many network drivers are written with > > > the assumption that any

Re: [PATCH 22/22] usb: document that URB transfer_buffer should be aligned

2017-03-30 Thread Mauro Carvalho Chehab
Em Thu, 30 Mar 2017 15:05:30 +0300 Laurent Pinchart escreveu: > Hi Mauro, > > On Thursday 30 Mar 2017 07:28:00 Mauro Carvalho Chehab wrote: > > Em Thu, 30 Mar 2017 12:34:32 +0300 Laurent Pinchart escreveu: > > > On Thursday 30 Mar 2017 10:11:31 Oliver Neukum

Re: [PATCH 22/22] usb: document that URB transfer_buffer should be aligned

2017-03-30 Thread Laurent Pinchart
Hi Mauro, On Thursday 30 Mar 2017 07:28:00 Mauro Carvalho Chehab wrote: > Em Thu, 30 Mar 2017 12:34:32 +0300 Laurent Pinchart escreveu: > > On Thursday 30 Mar 2017 10:11:31 Oliver Neukum wrote: > >> Am Donnerstag, den 30.03.2017, 01:15 +0300 schrieb Laurent Pinchart: > + may also override

RE: [PATCH 22/22] usb: document that URB transfer_buffer should be aligned

2017-03-30 Thread David Laight
From: Mauro Carvalho Chehab > Sent: 30 March 2017 11:28 ... > While debugging this issue, I saw *a lot* of network-generated URB > traffic from RPi3 Ethernet port drivers that were using non-aligned > buffers and were subject to the temporary buffer conversion. Buffers from the network stack will

Re: [PATCH 22/22] usb: document that URB transfer_buffer should be aligned

2017-03-30 Thread Mauro Carvalho Chehab
Em Thu, 30 Mar 2017 12:38:42 +0300 Laurent Pinchart escreveu: > Hi Mauro, > > On Wednesday 29 Mar 2017 22:06:33 Mauro Carvalho Chehab wrote: > > Em Thu, 30 Mar 2017 01:15:27 +0300 Laurent Pinchart escreveu: > > > On Wednesday 29 Mar 2017 15:54:21 Mauro

Re: [PATCH 22/22] usb: document that URB transfer_buffer should be aligned

2017-03-30 Thread Mauro Carvalho Chehab
Em Thu, 30 Mar 2017 12:34:32 +0300 Laurent Pinchart escreveu: > Hi Oliver, > > On Thursday 30 Mar 2017 10:11:31 Oliver Neukum wrote: > > Am Donnerstag, den 30.03.2017, 01:15 +0300 schrieb Laurent Pinchart: > > > > + may also override PAD bytes at the end

Re: [PATCH 22/22] usb: document that URB transfer_buffer should be aligned

2017-03-30 Thread Laurent Pinchart
Hi Mauro, On Wednesday 29 Mar 2017 22:06:33 Mauro Carvalho Chehab wrote: > Em Thu, 30 Mar 2017 01:15:27 +0300 Laurent Pinchart escreveu: > > On Wednesday 29 Mar 2017 15:54:21 Mauro Carvalho Chehab wrote: > > > Several host controllers, commonly found on ARM, like dwc2, > > > require buffers that

Re: [PATCH 22/22] usb: document that URB transfer_buffer should be aligned

2017-03-30 Thread Laurent Pinchart
Hi Oliver, On Thursday 30 Mar 2017 10:11:31 Oliver Neukum wrote: > Am Donnerstag, den 30.03.2017, 01:15 +0300 schrieb Laurent Pinchart: > > > + may also override PAD bytes at the end of the ``transfer_buffer``, > > > up to the > > > + size of the CPU word. > > > > "May" is quite weak here.

Re: [PATCH 22/22] usb: document that URB transfer_buffer should be aligned

2017-03-30 Thread Oliver Neukum
Am Donnerstag, den 30.03.2017, 01:15 +0300 schrieb Laurent Pinchart: > > +   may also override PAD bytes at the end of the ``transfer_buffer``, up to > > the > > +   size of the CPU word. > > "May" is quite weak here. If some host controller drivers require buffers to > be aligned, then it's an

Re: [PATCH 22/22] usb: document that URB transfer_buffer should be aligned

2017-03-29 Thread Mauro Carvalho Chehab
Em Thu, 30 Mar 2017 01:15:27 +0300 Laurent Pinchart escreveu: > Hi Mauro, > > Thank you for the patch. > > On Wednesday 29 Mar 2017 15:54:21 Mauro Carvalho Chehab wrote: > > Several host controllers, commonly found on ARM, like dwc2, > > require buffers that

Re: [PATCH 22/22] usb: document that URB transfer_buffer should be aligned

2017-03-29 Thread Laurent Pinchart
Hi Mauro, Thank you for the patch. On Wednesday 29 Mar 2017 15:54:21 Mauro Carvalho Chehab wrote: > Several host controllers, commonly found on ARM, like dwc2, > require buffers that are CPU-word aligned for they to work. > > Failing to do that will cause random troubles at the caller >

[PATCH 22/22] usb: document that URB transfer_buffer should be aligned

2017-03-29 Thread Mauro Carvalho Chehab
Several host controllers, commonly found on ARM, like dwc2, require buffers that are CPU-word aligned for they to work. Failing to do that will cause random troubles at the caller drivers, causing them to fail. Document it. Signed-off-by: Mauro Carvalho Chehab ---