1
0
mirror of https://git.yoctoproject.org/meta-ti synced 2026-07-26 22:07:51 +00:00
Files
meta-ti/recipes-kernel/linux/linux-ti33x-psp-3.2/psp/0016-usb-musb-cppi41-tx-dma-completion-fixes.patch
Koen Kooi 536748db58 linux-ti33x-psp 3.2: backport PM and USB fixes from PSP
The complete patchset will get rebased to the tip of the PSP tree soon, but the
conflicts take a lot of time to resolve.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
2012-06-11 16:59:07 -04:00

42 lines
1.3 KiB
Diff

From 2e3ec89c3e6cf54d83479d7437696343463c90e5 Mon Sep 17 00:00:00 2001
From: Ajay Kumar Gupta <ajay.gupta@ti.com>
Date: Thu, 24 May 2012 16:03:02 +0530
Subject: [PATCH 16/18] usb: musb: cppi41: tx dma completion fixes
Use spinlock_irqsave/restore only during txdma completion giveback.
Signed-off-by: Ravi B <ravibabu@ti.com>
---
drivers/usb/musb/cppi41_dma.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/musb/cppi41_dma.c b/drivers/usb/musb/cppi41_dma.c
index 4367e4f..ea83f9a 100644
--- a/drivers/usb/musb/cppi41_dma.c
+++ b/drivers/usb/musb/cppi41_dma.c
@@ -1354,7 +1354,6 @@ void txdma_completion_work(struct work_struct *data)
u16 csr;
tx_ch = &cppi->tx_cppi_ch[index];
- spin_lock_irqsave(&musb->lock, flags);
if (tx_ch->tx_complete) {
/* Sometimes a EP can unregister from a DMA
* channel while the data is still in the FIFO.
@@ -1384,10 +1383,12 @@ void txdma_completion_work(struct work_struct *data)
tx_ch->channel.status =
MUSB_DMA_STATUS_FREE;
tx_ch->tx_complete = 0;
+ spin_lock_irqsave(&musb->lock, flags);
musb_dma_completion(musb, index+1, 1);
+ spin_unlock_irqrestore(&musb->lock,
+ flags);
}
}
- spin_unlock_irqrestore(&musb->lock, flags);
if (!resched)
cond_resched();
--
1.7.7.6