Skip to contentSkip to conversation

mmc: dw_mmc: fix the transmission handling in IDMAC

PATCH Superseded Seungwon Jeon 2 participants 2 messages May 20, 2012 – May 21, 2012

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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

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.

---
 drivers/mmc/host/dw_mmc.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/mmc/host/dw_mmc.c +0 -1
index 9bbf45f..b46faf0 100644
@@ -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
Signature · 1 line
1.7.0.4
Acked-by on v1 1/4
#1 lore raw
Quoted 9 lines · Seungwon Jeon

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.

Quoted 5 lines

---
 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.