mmc: dw_mmc: fix misleading error print if failing to do DMA transfer
authorShawn Lin <shawn.lin@rock-chips.com>
Fri, 2 Sep 2016 04:14:38 +0000 (12:14 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 26 Sep 2016 19:31:36 +0000 (21:31 +0200)
The original log didn't figure out that we could still
finish this transfer by PIO mode even if failing to use
DMA. And it should be kept for debug level instead of
error one.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/dw_mmc.c

index 38099bafcd4ce581458699bc9cb82da2bee74664..c59a7b5c69a1fcf29984dd49110448de88dfd8e9 100644 (file)
@@ -1057,8 +1057,10 @@ static int dw_mci_submit_data_dma(struct dw_mci *host, struct mmc_data *data)
        spin_unlock_irqrestore(&host->irq_lock, irqflags);
 
        if (host->dma_ops->start(host, sg_len)) {
-               /* We can't do DMA */
-               dev_err(host->dev, "%s: failed to start DMA.\n", __func__);
+               /* We can't do DMA, try PIO for this one */
+               dev_dbg(host->dev,
+                       "%s: fall back to PIO mode for current transfer\n",
+                       __func__);
                return -ENODEV;
        }