diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-10-12 23:57:38 +0900 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2018-10-15 14:53:21 +0200 |
commit | 90f835414067b104d9249e279413dfa65abb99b6 (patch) | |
tree | 29039f42807c6087af2db34ede2b88291c8e4bff /drivers/mmc | |
parent | b7ced87746ebaad2ce2306061293be268575ed44 (diff) | |
download | linux-stable-90f835414067b104d9249e279413dfa65abb99b6.tar.gz linux-stable-90f835414067b104d9249e279413dfa65abb99b6.tar.bz2 linux-stable-90f835414067b104d9249e279413dfa65abb99b6.zip |
mmc: uniphier-sd: avoid using broken DMA RX channel
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>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/uniphier-sd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c index df854a33c81c..91a2be41edf6 100644 --- a/drivers/mmc/host/uniphier-sd.c +++ b/drivers/mmc/host/uniphier-sd.c @@ -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; |