]> git.baikalelectronics.ru Git - kernel.git/commit
USB: musb: blackfin: work around anomaly 05000450
authorMike Frysinger <vapier@gentoo.org>
Thu, 31 Mar 2011 02:48:54 +0000 (22:48 -0400)
committerFelipe Balbi <balbi@ti.com>
Wed, 13 Apr 2011 08:51:28 +0000 (11:51 +0300)
commit0c64e9cce1968ba95533d2bf036856ab77a40069
tree498abf639ee20de505593f776756d40fdcbe9d1c
parent129adc75c05bce3b220f32185f3ccc84a5905e5d
USB: musb: blackfin: work around anomaly 05000450

DMA mode 1 data corruption anomaly on Blackfin systems.  This issue is
specific to the Blackfin silicon as the bug appears to be related to the
connection of the musb ip to the bus/dma fabric.

Data corruption when using USB DMA mode 1. (Issue manager 17-01-0105)
DMA mode 1 allows large size transfers to generate a single interrupt
at the end of the entire transfer.  The transfer is split up in packets
of length specified in the Maximum Packet Size field for that endpoint.
If the transfer size is not an integer multiple of the Maximum Packet
Size, a short packet will be present at the end of the transfer.

Under certain conditions this packet may be corrupted in the USB FIFO.

Workaround:
Use DMA mode 1 to transfer (n* Maximum Packet Size) and schedule DMA
mode 0 to transfer the short packet.

As an example if your transfer size is 33168 bytes and Maximum Packet
Size equals 512, schedule [33168 - (33168 mod 512)] in DMA mode 1 and
the remainder (33168 mod 512) in DMA mode 0.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/musb/blackfin.c
drivers/usb/musb/musb_core.h
drivers/usb/musb/musbhsdma.c