Hi, On Mon, Jun 24, 2013 at 06:31:07PM +0400, Denis V. Lunev wrote: > with a length that isn't multiply by max pkt size for this endpoint. > > The commit 689d6eac (USB: UHCI: add native scatter-gather support(v1)) > introduced an implementation of scatter-gather list for UHCI. > This implementation has a bug when the size of a non-last sg > element was not multiply by TD's max-pkt-size. This bug was latent > till the commit 2851784f (usb/uhci: initialize sg_table properly) > which really initializes sg_table and enables SG lists in UHCI. > > The bug can be easily reproduced with Gadget Zero in full_speed mode > connected to a host with UHCI controller by the standard test from > tools/usb/ with command line > testusb -a -t 7 -c 2000 -s 4096 -v 41 > The test sends trash bytes to the gadget instead of only zero bytes > and so the test fails. > > This patch shortens TD's packet not only for the last TD in sg list, > but also for the last TD in sg element. > > Signed-off-by: Konstantin Filatov <kfila...@parallels.com> > Signed-off-by: Denis V. Lunev <d...@openvz.org> > Acked-by: Alan Stern <st...@rowland.harvard.edu> > CC: Ming Lei <tom.leim...@gmail.com> > CC: Sebastian Andrzej Siewior <bige...@linutronix.de> > CC: linux-usb@vger.kernel.org
this is not the correct way to send a patch. Subject line is wrong, please fix that. -- balbi
signature.asc
Description: Digital signature