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

Oliver Neukum oneukum at suse.com
Thu Mar 30 01:11:31 PDT 2017


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 API requirement, and all buffers must be aligned. I'm 
> not even sure I would mention that some host drivers require it, I think we 
> should just state that the API requires buffers to be aligned.

That effectively changes the API. Many network drivers are written with
the assumption that any contiguous buffer is valid. In fact you could
argue that those drivers are buggy and must use bounce buffers in those
cases.

So we need to include the full story here.

	Regards
		Oliver




More information about the linux-rpi-kernel mailing list