public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* dw_mmc: IDMAC Invalidate cache after read
@ 2018-11-21  7:42 JABLONSKY Jan
  2018-11-23 15:29 ` Robin Murphy
  0 siblings, 1 reply; 4+ messages in thread
From: JABLONSKY Jan @ 2018-11-21  7:42 UTC (permalink / raw)
  To: Jaehoon Chung
  Cc: Ulf Hansson, linux-mmc@vger.kernel.org,
	linux-kernel@vger.kernel.org

CPU may not see most up-to-date and correct copy of DMA buffer, when
internal DMA controller is in use.
Problem appears on The Altera SoC FPGA (uses integrated DMA controller),
during higher CPU and system memory load

Signed-off-by: Jan Jablonsky <jan.jablonsky@thalesgroup.com>
---
 drivers/mmc/host/dw_mmc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 80dc2fd..63873d9 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -499,8 +499,7 @@ static void dw_mci_dmac_complete_dma(void *arg)
 
 	dev_vdbg(host->dev, "DMA complete\n");
 
-	if ((host->use_dma == TRANS_MODE_EDMAC) &&
-	    data && (data->flags & MMC_DATA_READ))
+	if (data && (data->flags & MMC_DATA_READ))
 		/* Invalidate cache after read */
 		dma_sync_sg_for_cpu(mmc_dev(host->slot->mmc),
 				    data->sg,

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-12-01 14:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-21  7:42 dw_mmc: IDMAC Invalidate cache after read JABLONSKY Jan
2018-11-23 15:29 ` Robin Murphy
2018-11-27  0:43   ` Shawn Lin
2018-12-01 13:56     ` JABLONSKY Jan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox