linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: balajitk@ti.com (T Krishnamoorthy, Balaji)
To: linux-arm-kernel@lists.infradead.org
Subject: MMC: commit dba3c29 ruins mmc card data on beagle-xm revB
Date: Wed, 13 Jun 2012 20:58:54 +0530	[thread overview]
Message-ID: <CANrkHUaxJGcv2bdUWTCB_oKct-iFCKCdb7OQPTUjS4MuKeCS2w@mail.gmail.com> (raw)
In-Reply-To: <CACVXFVP16UmHe-GGydrSMgGHwnkSvYhnY339=zr=BfCehvS8Kw@mail.gmail.com>

On Mon, Jun 11, 2012 at 12:50 PM, Ming Lei <ming.lei@canonical.com> wrote:
>
> On Mon, Jun 11, 2012 at 2:21 PM, T Krishnamoorthy, Balaji
> <balajitk@ti.com> wrote:
> > Hi Ming Lei,
> > Can you let me know if you noticed any write/timeout errors ?
>
> Nothing error logs found during writing.
Hi,

Couldn't reproduce the issue with BeagleXM rev C, Might be a combination
of rev and SD card. How often do you see mis-match in file content?

Can you please try the inlined patch to get more info?

---
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 9a7a60a..77aabe6 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -60,6 +60,7 @@
 #define OMAP_HSMMC_STAT		0x0130
 #define OMAP_HSMMC_IE		0x0134
 #define OMAP_HSMMC_ISE		0x0138
+#define OMAP_HSMMC_AC12		0x013C
 #define OMAP_HSMMC_CAPA		0x0140

 #define VS18			(1 << 26)
@@ -177,6 +178,7 @@ struct omap_hsmmc_host {
 	int			reqs_blocked;
 	int			use_reg;
 	int			req_in_progress;
+	int			autocmd_err;
 	unsigned int		flags;
 	struct omap_hsmmc_next	next_data;

@@ -983,6 +985,7 @@ static void omap_hsmmc_do_irq(struct
omap_hsmmc_host *host, int status)
 {
 	struct mmc_data *data;
 	int end_cmd = 0, end_trans = 0;
+	u32 autocmd12;

 	if (!host->req_in_progress) {
 		do {
@@ -998,6 +1001,13 @@ static void omap_hsmmc_do_irq(struct
omap_hsmmc_host *host, int status)

 	if (status & ERR) {
 		omap_hsmmc_dbg_report_irq(host, status);
+		if (status & (1 << 24)) {
+			host->autocmd_err = 1;
+			dev_err(mmc_dev(host->mmc), "AutoCMD error STAT 0x%x\n", status);
+			autocmd12 = OMAP_HSMMC_READ(host->base, AC12);
+			dev_err(mmc_dev(host->mmc), "AutoCMD error 0x%x\n", autocmd12);
+		}
+
 		if ((status & CMD_TIMEOUT) ||
 			(status & CMD_CRC)) {
 			if (host->cmd) {
---
>
> Below is one of my test case.
>
> root at beagleboard:~# upk
> updateing kernel...
> flush storage...
> root at beagleboard:~# cat bin/upk
> #!/bin/sh
>
> echo "updateing kernel..."
> cp -f /mnt/nfs/t/uImage /media/mmcblk0p1/
>
> echo "flush storage..."
> sync
> root at beagleboard:~# diff /mnt/nfs/t/uImage /media/mmcblk0p1/uImage
> Binary files /mnt/nfs/t/uImage and /media/mmcblk0p1/uImage differ
> root at beagleboard:~# umount /media/mmcblk0p1
> root at beagleboard:~# mount -t vfat /dev/mmcblk0p1 /media/mmcblk0p1
> root at beagleboard:~#
> root at beagleboard:~#
> root at beagleboard:~# diff /mnt/nfs/t/uImage /media/mmcblk0p1/uImage
> Binary files /mnt/nfs/t/uImage and /media/mmcblk0p1/uImage differ
>
>
> Thanks,
> --
> Ming Lei

  parent reply	other threads:[~2012-06-13 15:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-11  2:47 MMC: commit dba3c29 ruins mmc card data on beagle-xm revB Ming Lei
     [not found] ` <CANrkHUYd8Ww6De4MiZ8_oPfcnhvtsZXOySLRiWSBU4QUQ6beHw@mail.gmail.com>
2012-06-11  7:20   ` Ming Lei
2012-06-13  5:26     ` S, Venkatraman
2012-06-13 15:28     ` T Krishnamoorthy, Balaji [this message]
2012-06-14  5:18       ` Ming Lei
2012-06-14 10:25       ` Ming Lei
2012-06-15  1:55       ` Ming Lei
2012-06-19 16:53       ` Paolo Pisati
2012-06-20  2:02         ` Ming Lei
2012-06-20  7:23         ` T Krishnamoorthy, Balaji
2012-06-22 11:51           ` Paolo Pisati
2012-06-22 15:33             ` T Krishnamoorthy, Balaji

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=CANrkHUaxJGcv2bdUWTCB_oKct-iFCKCdb7OQPTUjS4MuKeCS2w@mail.gmail.com \
    --to=balajitk@ti.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).