usb: Fix tusb6010 for DMA API
authorTony Lindgren <tony@atomide.com>
Mon, 22 Mar 2010 19:24:44 +0000 (12:24 -0700)
committerTony Lindgren <tony@atomide.com>
Mon, 22 Mar 2010 19:24:49 +0000 (12:24 -0700)
commita3c79779f63f832fc5a3543348a40e2530bb0038
tree81305b8f6db004966e7b04c057d518f00758ade0
parent07cb795612abc2921b797ff8ef69ce0034b2ee48
usb: Fix tusb6010 for DMA API

Commit 18eabe2347ae7a11b3db768695913724166dfb0e introduced
DMA buffer ownership. Fix tusb6010 accordingly.

Also change the order of musb_read_fifo() to happen after
dma_cache_maint to have the DMA operations completed before
moving the remaining unaligned bytes with PIO. The DMA
access and PIO touch different areas of the FIFO, so this
change only makes the code a bit easier to follow.

Tested on n810 and g_ether with variable size ping test.
The test seems to fail for some ping sizes, but that seems to
be a different problem.

Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/usb/musb/tusb6010.c
drivers/usb/musb/tusb6010_omap.c