usb: musb: gadget: fix dma length in txstate
authorMing Lei <tom.leiming@gmail.com>
Mon, 20 Sep 2010 07:32:06 +0000 (10:32 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 24 Sep 2010 18:05:01 +0000 (11:05 -0700)
commit66af83ddf7b5a4ea94e79cbeadaa0aeed4def5f7
tree06cc6046c4db50bc9dd1b165e9c02095bc12d57f
parentbb27bc2c1133372b54d00f3077ea4acbbf459045
usb: musb: gadget: fix dma length in txstate

DMA length should not go beyond the availabe space
of request buffer, so fix it.

Also set max_len of cppi dma channel as max size of
int type, so make musb dma handling happier.

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