]> git.baikalelectronics.ru Git - kernel.git/commit
USB: musb: gadget: fix MUSB_TXMAXP and MUSB_RXMAXP configuration
authorMing Lei <tom.leiming@gmail.com>
Wed, 20 Oct 2010 00:08:25 +0000 (19:08 -0500)
committerFelipe Balbi <balbi@ti.com>
Fri, 5 Nov 2010 11:56:17 +0000 (13:56 +0200)
commit5ae80b4d252edca13ada7120b5f619c12c371d46
treee01b78d1ac0cdb7acc99d41f9b968d3dc6529f68
parent7438bf63afae8890cc6d83ae67d8adcaca1b7973
USB: musb: gadget: fix MUSB_TXMAXP and MUSB_RXMAXP configuration

Commit 84ab2a5372673527e37ac24091d81f52e6f86984[USB: musb: disable
double buffering for older RTL versions] tries to disable double
buffer mode by writing endpoint hw max packet size to TXMAP/RXMAP.

First the approach can break full speed and cause overflow problems.
We should always set those registers with the actual max packet size
from endpoint descriptor.

Second, the problem describe by commit 84ab2a5372673527e37ac24091d81f52e6f86984
was caused by musb gadget driver; nothing to do with RTL revision as
originaly suspected.

The real fix to the problem is to always use actual max packet
size from endpoint descriptor to config TXMAP/RXMAP registers.

Cc: Cliff Cai <cliff.cai@analog.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>
Cc: stable@kernel.org
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/musb/musb_gadget.c