MMC: S3C24XX MMC/SD driver write fixes
authorHarald Welte <laforge@openmoko.org>
Mon, 30 Jun 2008 21:40:25 +0000 (22:40 +0100)
committerPierre Ossman <drzeus@drzeus.cx>
Tue, 15 Jul 2008 12:14:46 +0000 (14:14 +0200)
This patch is a workaround of some S3C2410 MMC chip bug

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
drivers/mmc/host/s3cmci.c

index c6a4d3cadf2bd1e3731d9ea961728454ec064ef4..4db5bd7c049469f29888fc24393af4e533574c88 100644 (file)
@@ -461,9 +461,19 @@ static irqreturn_t s3cmci_irq(int irq, void *dev_id)
 
        if (mci_csta & S3C2410_SDICMDSTAT_CRCFAIL) {
                if (cmd->flags & MMC_RSP_CRC) {
-                       cmd->error = -EILSEQ;
-                       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 {
+                               /* note, we used to fail the transfer
+                                * here, but it seems that this is just
+                                * the hardware getting it wrong.
+                                *
+                                * cmd->error = -EILSEQ;
+                                * host->status = "error: bad command crc";
+                                * goto fail_transfer;
+                               */
+                       }
                }
 
                mci_cclear |= S3C2410_SDICMDSTAT_CRCFAIL;