]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] omap_udc dma off-by-one fix
authorDavid Brownell <david-b@pacbell.net>
Sun, 16 Oct 2005 22:06:51 +0000 (15:06 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 28 Oct 2005 23:47:44 +0000 (16:47 -0700)
commit61b23b00fd3fb650739449c899ac23436bba358d
tree825fd67b5f945b31a5649bcfa1eaf5543cf93e5c
parent9c3876277131ea2a9c020ce2f8095a53c76e1c81
[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