mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roopesh <roopesh@cyberspace.org>
To: linux-kernel@vger.kernel.org
Subject: MMC: CRC Errors with 2GB cards
Date: Fri, 19 Oct 2007 12:17:00 -0400	[thread overview]
Message-ID: <20071019161700.GA19254@grex.cyberspace.org> (raw)

 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


--- linux-2.6.22/drivers/mmc/card/block.c	2007-09-27 14:59:44.000000000 +0530
+++ linux-tao/drivers/mmc/card/block.c	2007-10-19 20:53:52.000000000 +0530
@@ -298,6 +298,7 @@
 		}
 
 		if (rq_data_dir(req) != READ) {
+			/* Wait for the card to to be in transfer state*/
 			do {
 				int err;
 
@@ -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
 			if (cmd.resp[0] & ~0x00000900)
 				printk(KERN_ERR "%s: status = %08x\n",


 I noticed that at times the card is not actually in transfer 
 state when it recieves the second consecutive 
 MULTIPLE_BLOCK_WRITE cmd.  As per the simplified specification 
 available, all class 4 commands including CMD25 can be issued 
 only in tra state, though its also specified that READY_FOR_DATA 
 indicates whether the card can accept new data.

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

 Thanks and Regards,
 Roopesh.

             reply	other threads:[~2007-10-19 16:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-19 16:17 Roopesh [this message]
2007-10-27 12:00 ` Pierre Ossman
2007-10-29  9:50   ` Roopesh
2007-10-31 19:55     ` Pierre Ossman
2007-11-01 10:39       ` Roopesh

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=20071019161700.GA19254@grex.cyberspace.org \
    --to=roopesh@cyberspace.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®