[PATCH] omap_udc dma off-by-one fix
commitcb97c5c9d0789d65d7ec42a80946fa9eb2ec5182
authorDavid Brownell <david-b@pacbell.net>
Sun, 16 Oct 2005 22:06:51 +0000 (16 15:06 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 28 Oct 2005 23:47:44 +0000 (28 16:47 -0700)
tree825fd67b5f945b31a5649bcfa1eaf5543cf93e5c
parent1fcb4454cbada6dc495302172ac0412aa7d35fd4
[PATCH] omap_udc dma off-by-one fix

The change to make DMA work two bytes at a time omitted an important
tweak that affects the file_storage gadget:  it needs to recognize when
the host writes an odd number of bytes.  (The network layer ignores
such extra bytes.)

This patch resolves that issue by checking the relevant bit and adjusting
the rx byte count, so that for example a legal 13 byte request doesn't
morph into an illegal 14 byte one any more.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/omap_udc.c