[patch v2 03/16] MMC: S3C24XX MMC/SD driver write fixes

Ben Dooks
2008-06-16T14:36:16Z

[-- Attachment #1: thirdparty/openmoko-mci/s3cmci_dbg.patch --]
[-- Type: text/plain, Size: 1096 bytes --]

From: Harald Welte <laforge@openmoko.org>

This patch is a workaround of some S3C2410 MMC chip bug

Signed-off-by: Ben Dooks <ben-linux@fluff.org>

Index: linux-2.6.26-rc5-q2/drivers/mmc/host/s3cmci.c
===================================================================
--- linux-2.6.26-rc5-q2.orig/drivers/mmc/host/s3cmci.c 2008-06-16 14:19:18.000000000 +0100
+++ linux-2.6.26-rc5-q2/drivers/mmc/host/s3cmci.c 2008-06-16 14:19:44.000000000 +0100
@@ -454,11 +454,17 @@ static irqreturn_t s3cmci_irq(int irq, v

if (mci_csta & S3C2410_SDICMDSTAT_CRCFAIL) {
if (cmd->flags & MMC_RSP_CRC) {
- cmd->error = MMC_ERR_BADCRC;
- host->status = "error: bad command crc";
- goto fail_transfer;
+ if (host->mrq->cmd->flags & MMC_RSP_136) {
+ dbg(host, dbg_irq,
+ "fixup: ignore CRC fail with long rsp\n");
+ } else {
+#if 0
+ cmd->error = MMC_ERR_BADCRC;
+ host->status = "error: bad command crc";
+ goto fail_transfer;
+#endif
+ }
}
-
mci_cclear |= S3C2410_SDICMDSTAT_CRCFAIL;