Felipe Balbi wrote: > On Tue, Apr 06, 2010 at 05:09:12AM +0200, ext Cai, Cliff wrote: > >It can't pass some basic gadget test,i.e. gadget ethernet > >When running "ping -c 1 -s somesize ipaddress" it will print > >Out the data corruption. > > > >It seems to affect both sides, > > that's my feeling too. I can get it to fail with gadget zero testusb.c Felipe, With g_zero, do you see a hang or do you have data corruption? I am able to see a hang with g_zero and TX double-buffering enabled. I think I know why. I found one logic flaw in the current code - looks like it's taken care of in your series that enables mode1-rx. The attached patch should fix at least TX for you - needs more testing. It seems to work okay, at least on OMAP3630. (Note: RX double buffering was not enabled when I added this). The logic needs revisiting - the patch merely highlights the problem I was seeing. The first hunk is the change I made - the rest of it reverts Cliff's patch (commit 9f445cb29). (Sorry I have to attach it - I'm not taking chances with my broken mailer and inlined patches). - Anand
Attachment:
musb-try-tx-double-buffering.patch
Description: musb-try-tx-double-buffering.patch