From: addy ke Date: Fri, 20 Feb 2015 02:55:25 +0000 (+0800) Subject: mmc: dw_mmc: fix mmc_test by not sending abort for DRTO/EBE errors X-Git-Tag: v4.9.8~4496^2~76 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bdb9a90b3d123d9d421dd840c0f7fba1d1dfeba2;p=platform%2Fkernel%2Flinux-rpi3.git mmc: dw_mmc: fix mmc_test by not sending abort for DRTO/EBE errors The STOP command can terminate a data transfer between a memory card and mmc controller. As show in Synopsys DesignWare Cores Mobile Storage Host Databook: Data timeout and Data end-bit error will terminate further data transfer by mmc controller. So we should not send abort command to terminate a data transfer again if we got DRTO and EBE interrupt. After this patch, all mmc_test cases can pass on RK3288-Pink2 board. Signed-off-by: Addy Ke Reviewed-by: Doug Anderson Tested-by: Doug Anderson Tested-by: Javier Martinez Canillas Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index f30ef69..bed0f94 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -1534,7 +1534,10 @@ static void dw_mci_tasklet_func(unsigned long priv) if (test_and_clear_bit(EVENT_DATA_ERROR, &host->pending_events)) { dw_mci_stop_dma(host); - send_stop_abort(host, data); + if (data->stop || + !(host->data_status & (SDMMC_INT_DRTO | + SDMMC_INT_EBE))) + send_stop_abort(host, data); state = STATE_DATA_ERROR; break; } @@ -1561,7 +1564,10 @@ static void dw_mci_tasklet_func(unsigned long priv) if (test_and_clear_bit(EVENT_DATA_ERROR, &host->pending_events)) { dw_mci_stop_dma(host); - send_stop_abort(host, data); + if (data->stop || + !(host->data_status & (SDMMC_INT_DRTO | + SDMMC_INT_EBE))) + send_stop_abort(host, data); state = STATE_DATA_ERROR; break; }