mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-26 08:13:56 +00:00
mmc: dw_mmc: fix the transfer termination in IDMAC mode
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> Tested-by: Alim Akhtar <alim.akhtar@samsung.com> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
This commit is contained in:
parent
5ce9d96177
commit
aa50f259d6
1 changed files with 3 additions and 3 deletions
|
@ -345,11 +345,11 @@ static void dw_mci_stop_dma(struct dw_mci *host)
|
||||||
if (host->using_dma) {
|
if (host->using_dma) {
|
||||||
host->dma_ops->stop(host);
|
host->dma_ops->stop(host);
|
||||||
host->dma_ops->cleanup(host);
|
host->dma_ops->cleanup(host);
|
||||||
} else {
|
}
|
||||||
|
|
||||||
/* Data transfer was stopped by the interrupt handler */
|
/* Data transfer was stopped by the interrupt handler */
|
||||||
set_bit(EVENT_XFER_COMPLETE, &host->pending_events);
|
set_bit(EVENT_XFER_COMPLETE, &host->pending_events);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static int dw_mci_get_dma_dir(struct mmc_data *data)
|
static int dw_mci_get_dma_dir(struct mmc_data *data)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue