sdhci: use SG_MITER_TO_SG/SG_MITER_FROM_SG
authorSebastian Andrzej Siewior <sebastian@breakpoint.cc>
Thu, 18 Jun 2009 07:33:32 +0000 (09:33 +0200)
committerPierre Ossman <pierre@ossman.eu>
Fri, 31 Jul 2009 10:28:45 +0000 (12:28 +0200)
so the page will be flushed on unmap on ARCH which need it.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
drivers/mmc/host/sdhci.c

index 62041c7e9246030b381972a924298f592bb84989..fc96f8cb9c0b154db3464a10acdd834d5ec58fa6 100644 (file)
@@ -773,8 +773,14 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data)
        }
 
        if (!(host->flags & SDHCI_REQ_USE_DMA)) {
-               sg_miter_start(&host->sg_miter,
-                       data->sg, data->sg_len, SG_MITER_ATOMIC);
+               int flags;
+
+               flags = SG_MITER_ATOMIC;
+               if (host->data->flags & MMC_DATA_READ)
+                       flags |= SG_MITER_TO_SG;
+               else
+                       flags |= SG_MITER_FROM_SG;
+               sg_miter_start(&host->sg_miter, data->sg, data->sg_len, flags);
                host->blocks = data->blocks;
        }