AM3517: musb: fix iperf failure issue
authorAjay Kumar Gupta <ajay.gupta@ti.com>
Thu, 24 Dec 2009 04:43:31 +0000 (10:13 +0530)
committerVaibhav Hiremath <hvaibhav@ti.com>
Mon, 23 Jan 2012 19:14:11 +0000 (00:44 +0530)
As we get DMA completion interrupt even when data is in FIFO.
Fixing the issue by adding delay before calling dma completion.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
drivers/usb/musb/cppi41_dma.c

index 48d77d349033f2f2ce262130e5d56d8794266e14..38e725d06884b177bb919bcbe5310d4cf3c956c3 100644 (file)
@@ -1164,6 +1164,15 @@ static void usb_process_tx_queue(struct cppi41 *cppi, unsigned index)
                else if (tx_ch->channel.actual_len >= tx_ch->length) {
                        tx_ch->channel.status = MUSB_DMA_STATUS_FREE;
 
+                       /*
+                        * We get Tx DMA completion interrupt even when
+                        * data is still in FIFO and not moved out to
+                        * USB bus. As we program the next request we
+                        * flush out and old data in FIFO which affects
+                        * USB functionality. So far, we have obsered
+                        * failure with iperf.
+                        */
+                       udelay(20);
                        /* Tx completion routine callback */
                        musb_dma_completion(cppi->musb, ep_num, 1);
                }