[PATCH 1/4] mmc: dw_mmc: fix the transmission handling in IDMAC

Subsystems: multimedia card (mmc), secure digital (sd) and sdio subsystem, synopsys designware mmc/sd/sdio driver, the rest

STALE5268d

2 messages, 2 authors, 2012-05-21 · open the first message on its own page

[PATCH 1/4] mmc: dw_mmc: fix the transmission handling in IDMAC

From: Seungwon Jeon <hidden>
Date: 2012-05-20 04:27:23

DTO interrupt can be later than transmit interrupt(IDMAC)
in case of write. Current handling of IDMAC interrupt sets
EVENT_DATA_COMPLETE as well as EVENT_XFER_COMPLETE regardless
DTO rising. This makes the current request be finished in tasklet
and permits the next request even though current data transfer
is still in progress. As a result, sequence is broken and lock-up
happens. Setting EVENT_DATA_COMPLETE is not proper after IDMAC
interrupt. It should be taken after DTO interrupt is generated.

Reported-by: Dmitry Shmidt <redacted>
Signed-off-by: Seungwon Jeon <redacted>
---
 drivers/mmc/host/dw_mmc.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 9bbf45f..b46faf0 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1623,7 +1623,6 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
 	if (pending & (SDMMC_IDMAC_INT_TI | SDMMC_IDMAC_INT_RI)) {
 		mci_writel(host, IDSTS, SDMMC_IDMAC_INT_TI | SDMMC_IDMAC_INT_RI);
 		mci_writel(host, IDSTS, SDMMC_IDMAC_INT_NI);
-		set_bit(EVENT_DATA_COMPLETE, &host->pending_events);
 		host->dma_ops->complete(host);
 	}
 #endif
-- 
1.7.0.4

Re: [PATCH 1/4] mmc: dw_mmc: fix the transmission handling in IDMAC

From: Will Newton <hidden>
Date: 2012-05-21 10:11:37

On Sun, May 20, 2012 at 5:27 AM, Seungwon Jeon [off-list ref] wrote:
DTO interrupt can be later than transmit interrupt(IDMAC)
in case of write. Current handling of IDMAC interrupt sets
EVENT_DATA_COMPLETE as well as EVENT_XFER_COMPLETE regardless
DTO rising. This makes the current request be finished in tasklet
and permits the next request even though current data transfer
is still in progress. As a result, sequence is broken and lock-up
happens. Setting EVENT_DATA_COMPLETE is not proper after IDMAC
interrupt. It should be taken after DTO interrupt is generated.

Reported-by: Dmitry Shmidt <redacted>
Signed-off-by: Seungwon Jeon <redacted>
---
 drivers/mmc/host/dw_mmc.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
This looks ok, although I don't have any IDMAC hardware to test with.

Acked-by: Will Newton <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help