]> git.baikalelectronics.ru Git - kernel.git/commit
usb: musb: gadget: fix ZLP sending in musb_g_tx(v1)
authorMing Lei <tom.leiming@gmail.com>
Fri, 24 Sep 2010 10:44:14 +0000 (13:44 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 22 Oct 2010 17:21:56 +0000 (10:21 -0700)
commitdeea8f333e66d93d5550b567e1473f7da32e4b86
tree50509fa9b9da211ad2ce342d11e7a376544a8327
parent657780df6cfd4f4221300d3773f8c87045191373
usb: musb: gadget: fix ZLP sending in musb_g_tx(v1)

This patch fixes the problem reported by Sergei:

>how come? we need to send ZLP before giving back the request.
>Well, look at the code ionce again. We need to send ZLP *after*
>request->actual == request->length, but as the check is inserted
>after the ZLP send, ZLP *may* be sent once the first DMA completes,
>not the last.

The patch also has been discussed on the link below:

http://marc.info/?t=128454814900001&r=1&w=2

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Reported-by: Sergei Shtylyov <sshtylyov@mvista.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Anand Gadiyar <gadiyar@ti.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/musb/musb_gadget.c