]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mmc: uniphier-sd: avoid using broken DMA RX channel
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 12 Oct 2018 14:57:38 +0000 (23:57 +0900)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 15 Oct 2018 12:53:21 +0000 (14:53 +0200)
host->chan_rx is NULL when UNIPHIER_SD_CAP_BROKEN_DMA_RX quirk flag
is set. In this case, it should not set up DMA.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/uniphier-sd.c

index df854a33c81cd585abddae4cef5f48641364c79a..91a2be41edf6196bd9fc7f73262ab206efa46d1f 100644 (file)
@@ -252,6 +252,9 @@ static void uniphier_sd_internal_dma_start(struct tmio_mmc_host *host,
        u32 dma_mode;
        int sg_len;
 
+       if ((data->flags & MMC_DATA_READ) && !host->chan_rx)
+               goto force_pio;
+
        if (WARN_ON(host->sg_len != 1))
                goto force_pio;