Re: MMC: CRC Errors with 2GB cards

From: Pierre Ossman
Date: Sat Oct 27 2007 - 08:01:34 EST


Hi Roopesh,

I'm terribly sorry I haven't replied sooner. I put your message on my todo list, figuring I could get to it within a day or two, but as you noticed, that didn't quite happen. :/

On Fri, 19 Oct 2007 12:17:00 -0400
Roopesh <roopesh@xxxxxxxxxxxxxx> wrote:

> Hi,
>
> I am seeing a lot of CRC errors happening with CMD25 on a couple
> of Transcend 2GB cards (specifiation version 1.1). However, if
> I apply the following patch, I see no errors being reported
>

Ok, so the card is mishandling the state bits a bit. We should be able to work around that.

> @@ -310,8 +311,8 @@
> req->rq_disk->disk_name, err);
> goto cmd_err;
> }
> - } while (!(cmd.resp[0] & R1_READY_FOR_DATA));
> -
> + } while (!(R1_CURRENT_STATE(cmd.resp[0]) == 4));
> +
> #if 0

This might trade us one problem for another. Could you try the following:

} while (!(cmd.resp[0] & R1_READY_FOR_DATA) || (R1_CURRENT_STATE(cmd.resp[0]) == 7));

This should also work for cards that mishandle the state field, and if the card jumps to
some odd state for some reason.

>
> I am just wondering if I have set of broken cards. Any pointers
> in this regard?
>

You do. But don't be too alarmed, that is unfortunately the norm. :/

Rgds
--
-- Pierre Ossman

Linux kernel, MMC maintainer http://www.kernel.org
PulseAudio, core developer http://pulseaudio.org
rdesktop, core developer http://www.rdesktop.org
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/