openwrtv3/target/linux/brcm2708/patches-3.10/0017-sdhci-bcm2708-raise-DMA-sync-timeout.patch
Florian Fainelli 6918ea2484 brcm2708: update 3.10 patches with raspberrypi/rpi-3.10.y of 27 Apr. 2014
Update the 3.10 rasperry patches by rebasing raspberry/rpi-3.10-y
against linux-stable/v3.10.49.

Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 42678
2014-09-27 19:10:51 +00:00

32 lines
1.2 KiB
Diff

From 93ad4d743dfa8a5f6bb1d7abf739c7149012099b Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Sat, 16 Jun 2012 22:35:38 +0100
Subject: [PATCH 017/196] sdhci-bcm2708: raise DMA sync timeout
Commit d64b84c by accident reduced the maximum overall DMA sync
timeout. The maximum overall timeout was reduced from 100ms to 30ms,
which isn't enough for many cards. Increase it to 150ms, just to be
extra safe. According to commit 872a8ff in the MMC subsystem, some
cards require crazy long timeouts (3s), but as we're busy-waiting,
and shouldn't delay for such a long time, let's hope 150ms will be
enough for most cards.
---
drivers/mmc/host/sdhci-bcm2708.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c
index 0ee983c..b0cdd7d 100644
--- a/drivers/mmc/host/sdhci-bcm2708.c
+++ b/drivers/mmc/host/sdhci-bcm2708.c
@@ -830,7 +830,7 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host,
We get CRC and DEND errors unless we wait for
the SD controller to finish reading/writing to the card. */
u32 state_mask;
- int timeout=1000;
+ int timeout=5000;
DBG("PDMA over - sync card\n");
if (data->flags & MMC_DATA_READ)
--
1.9.1