public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Kiryukhin <vksavl@gmail.com>
To: linux-mmc@vger.kernel.org
Cc: vksavl@gmail.com
Subject: cmd12 fails to stop out of range reads on Sandisk 2Gb microSD card.
Date: Thu, 04 Mar 2010 00:43:13 +0300	[thread overview]
Message-ID: <4B8ED7F1.5040204@gmail.com> (raw)

Hi,
There was an issue reported by Cliff Brake some time ago regarding 
Sandisk 2Gb SD card behavior.
(http://www.mail-archive.com/linux-mmc@vger.kernel.org/msg00982.html)
It seems I have similar issue with Sandisk 2Gb microSD:
CMD18 read last 8 blocks available (512 bytes each). After the reception 
of last bytes of last block cmd12 is send to stop transmit. But while 
command is send card continue transmit. And the first byte received is 
data error token with valid value 0x8 - out of range. Then 0fxff follows 
and 8-th byte should be response to cmd12. The problem is: 2Gb sandisk 
card send 0xc2 and refuse accept any other commands - e.g. it responds 
with 0x4 to subsequent cmd17. But other card (no name) responds with 0 
instead of 0xc2.

8 ff ff ff ff ff ff ff c2 3f ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  [Sandisk (SU02G)]

8 ff ff ff ff ff ff ff 0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   [other card (SD02G)]

I can catch this condition, but it's not clear how to resume - card 
keeps sending 0x4 (illegal command) response.
Is this a known issue? I'm using rather old 2.6.19 code (with some 
backports form upstream), but I didn't find proper fix in later code. 
Workaround I use at the moment - report smaller disk size - violating 
block is not read and card can be mounted (m.b. with warnings related to 
cheat with size).
Any help would be highly appreciated!
--
Thanks,
Pavel Kiryukhin


             reply	other threads:[~2010-03-03 21:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-03 21:43 Pavel Kiryukhin [this message]
2010-03-03 21:47 ` cmd12 fails to stop out of range reads on Sandisk 2Gb microSD card Pavel Kiryukhin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B8ED7F1.5040204@gmail.com \
    --to=vksavl@gmail.com \
    --cc=linux-mmc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox