]> git.baikalelectronics.ru Git - kernel.git/commit
USB: gadget: imx_udc: don't queue more data when zlp is to be sent
authorDaniel Glöckner <dg@emlix.com>
Thu, 28 May 2009 11:00:14 +0000 (13:00 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 16 Jun 2009 04:44:46 +0000 (21:44 -0700)
commit8cb09728b0478a721b6aa68e3a399a2e1f4d0f7d
tree9127ca038b29340185caff4621126ae83baf14f1
parentb1db51da7acaf0e64f3c46fc3baf39555b113804
USB: gadget: imx_udc: don't queue more data when zlp is to be sent

When a zero-length packet has been requested and another packet is
written into the fifo, the MX1 tends to send the first byte of the
previous packet instead of the first byte of the current packet.
The CRC is adjusted accordingly so that this packet is _not_
discarded by the host.

Waiting for the ZLPS bit to clear avoids these bad packets.

Signed-off-by: Daniel Glöckner <dg@emlix.com>
Cc: Darius Augulis <augulis.darius@gmail.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/imx_udc.c