* [PATCH v2 1/4] mmc: dw_mmc: fix the transmission handling in IDMAC @ 2012-05-22 4:00 Seungwon Jeon 2012-05-23 4:18 ` Jaehoon Chung 0 siblings, 1 reply; 4+ messages in thread From: Seungwon Jeon @ 2012-05-22 4:00 UTC (permalink / raw) To: linux-mmc Cc: 'Chris Ball', 'Will Newton', 'James Hogan' 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 <dimitrysh@android.com> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com> --- 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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/4] mmc: dw_mmc: fix the transmission handling in IDMAC 2012-05-22 4:00 [PATCH v2 1/4] mmc: dw_mmc: fix the transmission handling in IDMAC Seungwon Jeon @ 2012-05-23 4:18 ` Jaehoon Chung 2012-05-23 6:26 ` Seungwon Jeon 0 siblings, 1 reply; 4+ messages in thread From: Jaehoon Chung @ 2012-05-23 4:18 UTC (permalink / raw) To: Seungwon Jeon Cc: linux-mmc, 'Chris Ball', 'Will Newton', 'James Hogan', hyeonsu.kim 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 On 05/22/2012 01:00 PM, Seungwon Jeon 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 <dimitrysh@android.com> > Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com> > --- > 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH v2 1/4] mmc: dw_mmc: fix the transmission handling in IDMAC 2012-05-23 4:18 ` Jaehoon Chung @ 2012-05-23 6:26 ` Seungwon Jeon 2012-05-23 7:18 ` Jaehoon Chung 0 siblings, 1 reply; 4+ messages in thread From: Seungwon Jeon @ 2012-05-23 6:26 UTC (permalink / raw) To: 'Jaehoon Chung' Cc: linux-mmc, 'Chris Ball', 'Will Newton', 'James Hogan', hyeonsu.kim 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 Jaehoon Chung <jh80.chung@samsung.com> wrote: > 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 > > On 05/22/2012 01:00 PM, Seungwon Jeon 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 <dimitrysh@android.com> > > Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com> > > --- > > 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 > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-mmc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/4] mmc: dw_mmc: fix the transmission handling in IDMAC 2012-05-23 6:26 ` Seungwon Jeon @ 2012-05-23 7:18 ` Jaehoon Chung 0 siblings, 0 replies; 4+ messages in thread From: Jaehoon Chung @ 2012-05-23 7:18 UTC (permalink / raw) To: Seungwon Jeon Cc: 'Jaehoon Chung', linux-mmc, 'Chris Ball', 'Will Newton', 'James Hogan', hyeonsu.kim Hi Seungwon Jeon, This patch looks good to me..also. I think good that should be added Signed-off-by : Hyeonsu Kim <hyeonsu.kim@samsung.com> Anyway, you reminded this patch. Thanks :) Best Regards, Jaehoon Chung On 05/23/2012 03:26 PM, Seungwon Jeon wrote: > 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 > Jaehoon Chung <jh80.chung@samsung.com> wrote: >> 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 >> >> On 05/22/2012 01:00 PM, Seungwon Jeon 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 <dimitrysh@android.com> >>> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com> >>> --- >>> 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 >> >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in >> the body of a message to majordomo@vger.kernel.org >> 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 majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-05-23 7:18 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-05-22 4:00 [PATCH v2 1/4] mmc: dw_mmc: fix the transmission handling in IDMAC Seungwon Jeon 2012-05-23 4:18 ` Jaehoon Chung 2012-05-23 6:26 ` Seungwon Jeon 2012-05-23 7:18 ` Jaehoon Chung
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox