* [PATCH 14/14] mmc: dw_mmc: fix the transfer termination in IDMAC mode
@ 2013-08-21 13:51 Seungwon Jeon
2013-08-23 12:28 ` Jaehoon Chung
0 siblings, 1 reply; 2+ messages in thread
From: Seungwon Jeon @ 2013-08-21 13:51 UTC (permalink / raw)
To: linux-mmc
Cc: 'Chris Ball', 'Jaehoon Chung',
'Alim Akhtar', 'Bing Zhao ',
'Doug Anderson'
In IDMAC mode EVENT_XFER_COMPLETE is set when RI/TI of last descriptor
is done. So if errors are happened in the middle of data transfers,
'dw_mci_stop_dma' during error handing can be called and eventually
prevents this flag to be set.
This results in permanent wait for EVENT_XFER_COMPLETE in 'dw_mci_tasklet_func'.
Therefore, if dma running is stopped forcibly, EVENT_XFER_COMPLETE should be set.
Reported-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
---
drivers/mmc/host/dw_mmc.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 8c1926f..5b52ac1 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -345,10 +345,10 @@ static void dw_mci_stop_dma(struct dw_mci *host)
if (host->using_dma) {
host->dma_ops->stop(host);
host->dma_ops->cleanup(host);
- } else {
- /* Data transfer was stopped by the interrupt handler */
- set_bit(EVENT_XFER_COMPLETE, &host->pending_events);
}
+
+ /* Data transfer was stopped by the interrupt handler */
+ set_bit(EVENT_XFER_COMPLETE, &host->pending_events);
}
static int dw_mci_get_dma_dir(struct mmc_data *data)
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 14/14] mmc: dw_mmc: fix the transfer termination in IDMAC mode
2013-08-21 13:51 [PATCH 14/14] mmc: dw_mmc: fix the transfer termination in IDMAC mode Seungwon Jeon
@ 2013-08-23 12:28 ` Jaehoon Chung
0 siblings, 0 replies; 2+ messages in thread
From: Jaehoon Chung @ 2013-08-23 12:28 UTC (permalink / raw)
To: Seungwon Jeon
Cc: linux-mmc, 'Chris Ball', 'Alim Akhtar',
'Bing Zhao ', 'Doug Anderson'
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
On 08/21/2013 10:51 PM, Seungwon Jeon wrote:
> In IDMAC mode EVENT_XFER_COMPLETE is set when RI/TI of last descriptor
> is done. So if errors are happened in the middle of data transfers,
> 'dw_mci_stop_dma' during error handing can be called and eventually
> prevents this flag to be set.
> This results in permanent wait for EVENT_XFER_COMPLETE in 'dw_mci_tasklet_func'.
> Therefore, if dma running is stopped forcibly, EVENT_XFER_COMPLETE should be set.
>
> Reported-by: Bing Zhao <bzhao@marvell.com>
> Signed-off-by: Doug Anderson <dianders@chromium.org>
> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
> ---
> drivers/mmc/host/dw_mmc.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 8c1926f..5b52ac1 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -345,10 +345,10 @@ static void dw_mci_stop_dma(struct dw_mci *host)
> if (host->using_dma) {
> host->dma_ops->stop(host);
> host->dma_ops->cleanup(host);
> - } else {
> - /* Data transfer was stopped by the interrupt handler */
> - set_bit(EVENT_XFER_COMPLETE, &host->pending_events);
> }
> +
> + /* Data transfer was stopped by the interrupt handler */
> + set_bit(EVENT_XFER_COMPLETE, &host->pending_events);
> }
>
> static int dw_mci_get_dma_dir(struct mmc_data *data)
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-23 12:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-21 13:51 [PATCH 14/14] mmc: dw_mmc: fix the transfer termination in IDMAC mode Seungwon Jeon
2013-08-23 12:28 ` Jaehoon Chung
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox