Thread (11 messages) 11 messages, 3 authors, 2018-10-15
STALE2822d

[PATCH 2/2] mmc: uniphier-sd: avoid using broken DMA RX channel

From: Masahiro Yamada <hidden>
Date: 2018-10-12 14:58:51
Also in: linux-mmc, lkml
Subsystem: arm/uniphier architecture, multimedia card (mmc), secure digital (sd) and sdio subsystem, the rest · Maintainers: Kunihiko Hayashi, Masami Hiramatsu, Ulf Hansson, Linus Torvalds

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 <redacted>
---

 drivers/mmc/host/uniphier-sd.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c
index 10d49aa..1ee9fd0 100644
--- a/drivers/mmc/host/uniphier-sd.c
+++ b/drivers/mmc/host/uniphier-sd.c
@@ -251,6 +251,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;
 
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help