]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Feb 2014 23:47:24 +0000 (15:47 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Feb 2014 23:47:24 +0000 (15:47 -0800)
added patches:
mmc-atmel-mci-fix-timeout-errors-in-sdio-mode-when-using-dma.patch

queue-3.4/mmc-atmel-mci-fix-timeout-errors-in-sdio-mode-when-using-dma.patch [new file with mode: 0644]
queue-3.4/series

diff --git a/queue-3.4/mmc-atmel-mci-fix-timeout-errors-in-sdio-mode-when-using-dma.patch b/queue-3.4/mmc-atmel-mci-fix-timeout-errors-in-sdio-mode-when-using-dma.patch
new file mode 100644 (file)
index 0000000..f28defa
--- /dev/null
@@ -0,0 +1,50 @@
+From 66b512eda74d59b17eac04c4da1b38d82059e6c9 Mon Sep 17 00:00:00 2001
+From: Ludovic Desroches <ludovic.desroches@atmel.com>
+Date: Wed, 20 Nov 2013 16:01:11 +0100
+Subject: mmc: atmel-mci: fix timeout errors in SDIO mode when using DMA
+
+From: Ludovic Desroches <ludovic.desroches@atmel.com>
+
+commit 66b512eda74d59b17eac04c4da1b38d82059e6c9 upstream.
+
+With some SDIO devices, timeout errors can happen when reading data.
+To solve this issue, the DMA transfer has to be activated before sending
+the command to the device. This order is incorrect in PDC mode. So we
+have to take care if we are using DMA or PDC to know when to send the
+MMC command.
+
+Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
+Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
+Signed-off-by: Chris Ball <cjb@laptop.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mmc/host/atmel-mci.c |   13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+--- a/drivers/mmc/host/atmel-mci.c
++++ b/drivers/mmc/host/atmel-mci.c
+@@ -1022,11 +1022,22 @@ static void atmci_start_request(struct a
+       iflags |= ATMCI_CMDRDY;
+       cmd = mrq->cmd;
+       cmdflags = atmci_prepare_command(slot->mmc, cmd);
+-      atmci_send_command(host, cmd, cmdflags);
++
++      /*
++       * DMA transfer should be started before sending the command to avoid
++       * unexpected errors especially for read operations in SDIO mode.
++       * Unfortunately, in PDC mode, command has to be sent before starting
++       * the transfer.
++       */
++      if (host->submit_data != &atmci_submit_data_dma)
++              atmci_send_command(host, cmd, cmdflags);
+       if (data)
+               host->submit_data(host, data);
++      if (host->submit_data == &atmci_submit_data_dma)
++              atmci_send_command(host, cmd, cmdflags);
++
+       if (mrq->stop) {
+               host->stop_cmdr = atmci_prepare_command(slot->mmc, mrq->stop);
+               host->stop_cmdr |= ATMCI_CMDR_STOP_XFER;
index 079f8587be5fee564df4f3e196a494b3ea5655a7..bf7d46006e2f47f08198d13eef832ea221b12b56 100644 (file)
@@ -2,3 +2,4 @@ selinux-fix-memory-leak-upon-loading-policy.patch
 ftrace-have-function-graph-only-trace-based-on-global_ops-filters.patch
 intel-iommu-fix-off-by-one-in-pagetable-freeing.patch
 audit-correct-a-type-mismatch-in-audit_syscall_exit.patch
+mmc-atmel-mci-fix-timeout-errors-in-sdio-mode-when-using-dma.patch