Skip to contentSkip to conversation

mmc: dw_mmc: fix the transmission handling in IDMAC

PATCH In review Seungwon Jeon 2 participants 4 messages May 22, 2012 – May 23, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 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
maintainer
#1 lore raw

Hi Seungwon,

This patch is already sent from Hyeonsu Kim,
Plz check the below patch.
Add Hyeonsu to CC'd

http://comments.gmane.org/gmane.linux.kernel.mmc/12870

Best Regards,
Jaehoon Chung

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

---
 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
#2 lore raw

Hi, Jaehoon Chung,

We have missed Hyeonsu's patch?
I checked the your link page and found the similarity of patch now. How can we do?
Anyway, it'd need to be applied.

Thanks,
Seungwon Jeon

Quoted 46 lines · Jaehoon Chung

Hi Seungwon,

This patch is already sent from Hyeonsu Kim,
Plz check the below patch.
Add Hyeonsu to CC'd

http://comments.gmane.org/gmane.linux.kernel.mmc/12870

Best Regards,
Jaehoon Chung

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

---
 drivers/mmc/host/dw_mmc.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/mmc/host/dw_mmc.c +0 -0
index 9bbf45f..b46faf0 100644

drivers/mmc/host/dw_mmc.c static irqreturn_t dw_mci_interrupt(int irq, void *dev_id) · line 1628

Quoted 7 lines
drivers/mmc/host/dw_mmc.c +0 -1
@@ -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

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer
#3 lore raw

Hi Seungwon Jeon,

This patch looks good to me..also.

I think good that should be added

Anyway, you reminded this patch.
Thanks :)

Best Regards,
Jaehoon Chung

Quoted 62 lines · Seungwon Jeon

Hi, Jaehoon Chung,

We have missed Hyeonsu's patch?
I checked the your link page and found the similarity of patch now. How can we do?
Anyway, it'd need to be applied.

Thanks,
Seungwon Jeon

Quoted 38 lines · Jaehoon Chung

Hi Seungwon,

This patch is already sent from Hyeonsu Kim,
Plz check the below patch.
Add Hyeonsu to CC'd

http://comments.gmane.org/gmane.linux.kernel.mmc/12870

Best Regards,
Jaehoon Chung

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

---
 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);
Quoted 8 lines

drivers/mmc/host/dw_mmc.c static irqreturn_t dw_mci_interrupt(int irq, void *dev_id) · line 1628

Quoted 2 lines
drivers/mmc/host/dw_mmc.c +0 -0
 	}
 #endif

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html