mmc: return immediately once the dwmci data transfer fails
PATCH 1/1 mmc: return immediately once the dwmci data transfer fails
Originally, when the host is in dma mode, the return status of dwmci_data_transfer() gets overlapped by the latter DWMCI_IDINTEN query. When the data transfer fails and the query succeeds, the failure gets escaped. Add quick return when data transfer fails.
Signed-off-by linjunbao <[email protected]>
---
drivers/mmc/dw_mmc.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/mmc/dw_mmc.c +4 -0
@@ -372,6 +372,10 @@ static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,if (data) { ret =dwmci_data_transfer (host, data); +if (ret) { +debug ("DWMCI data transfer fail.\n" ); +return ret; + }/* only dma mode need it */ if (!host->fifo_mode) {
Signature · 1 line
2.25.1