Re: [PATCH v6] RFT: mmc: sdhci: Implement an SDHCI-specific bounce buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 22, 2018 at 9:33 AM, Benjamin Beckmeyer
<beckmeyer.b@xxxxxxxxx> wrote:
> Hey Linus,
>
>> Annoying ... since the i.MX and x86 PCI version so clearly differs
>> here I'm left to trial and error over the mailing list.
>
> I know, can I do something that it makes it easier for you?

It's just how it is. Let's use mails and brains for debugging :D

>> Could you try this on top of the patch?
>
> Built in and here is the output. I think, it's what you want,
> but it doesn't work either.

OK that doesn't work. Scratch that patch. What about this instead?

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 25b5e598ee6d..416e94dead4f 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -523,7 +523,7 @@ static int sdhci_pre_dma_transfer(struct sdhci_host *host,
         dma_sync_single_for_device(host->mmc->parent,
                        host->bounce_addr,
                        host->bounce_buffer_size,
-                       DMA_TO_DEVICE);
+                       mmc_get_dma_dir(data));
         /* Just a dummy value */
         sg_count = 1;
     } else {
@@ -2422,6 +2422,12 @@ static bool sdhci_request_done(struct sdhci_host *host)
                         data->sg_len,
                         host->bounce_buffer,
                         length);
+                } else {
+                    dma_sync_single_for_cpu(
+                        host->mmc->parent,
+                        host->bounce_addr,
+                        host->bounce_buffer_size,
+                        mmc_get_dma_dir(data));
                 }
             } else {
                 /* Unmap the raw data */


Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux