linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mhowe@cwlinux.com (Morgan Howe)
To: linux-arm-kernel@lists.infradead.org
Subject: mxcmmc driver hangs on sync
Date: Tue, 15 Jun 2010 11:29:36 +0800	[thread overview]
Message-ID: <20100615112936.5d03ce92@morgan> (raw)

Greetings,

I'm using a freescale i.mx27 board with 2 class 2 sdhc cards.
Originally we were working with the 2.6.22 kernel from freescale, but
found that after an extended period of writing to the SD card (around
2k-3k writes of a 1mb file), the driver would hang when we called the
sync command. It appeared to be an issue related to dma interrupts.

Since we have been wanting to move to the newer kernel anyway, I
decided to try a similar test using the current mainline kernel from
Linus' tree.  Basically, my test is a simple bash script which does
this:

while(true) {
cp 1mb_test_file SD1
cp SD1/1mb_test_file SD2
sync
}

With the older kernel this would hang on sync after a few thousand
loops, and much sooner if you ran 2 or 3 of these processes at a time.
I tried last night with the newer kernel and kicking off 3 processes
and after ~100-150 loops per process I get this:

mxc-mmc mxc-mmc.0: mxcmci_finish_data: No CRC -ETIMEDOUT
mmcblk0: error -110 transferring data, sector 24765007, nr 512, card
status 0x0 mmcblk0: error -110 sending stop command, response 0x0, card
status 0x0 end_request: I/O error, dev mmcblk0, sector 24765021
end_request: I/O error, dev mmcblk0, sector 24765023
end_request: I/O error, dev mmcblk0, sector 24765031
end_request: I/O error, dev mmcblk0, sector 24765039
...
<snip>

It then continues for ~20 more loops per process, and then again I get
that same error. Continues for a while longer and then finally this:

mxc-mmc mxc-mmc.1: mxcmci_finish_data: No CRC -ETIMEDOUT
mmcblk1: error -110 transferring data, sector 8859727, nr 144, card
status 0xc00 FEC: MDIO read timeout

And I can see in the output from ps:

  535 0         2808 S    /bin/sh ./test.sh 
  673 0         2808 S    /bin/sh ./test.sh 
  747 0         2808 S    /bin/sh ./test.sh 
 2097 0         2672 D    sync 
 2098 0         2672 D    sync 
 2099 0         2672 D    sync 
 2261 0            0 SW   [flush-179:8]
 2262 0         3052 R    ps

Has anyone seen this or have any suggestions how I may be able to go
about fixing it?

Regards,
Morgan

             reply	other threads:[~2010-06-15  3:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-15  3:29 Morgan Howe [this message]
2010-06-15  6:31 ` mxcmmc driver hangs on sync Daniel Mack
2010-06-15  7:20   ` Morgan Howe
2010-06-15  7:22     ` Daniel Mack
2010-06-15 10:32       ` Morgan Howe
2010-06-17  8:33       ` Morgan Howe
2010-06-17 18:51         ` Erik Oomen
2010-06-17 19:59           ` Daniel Mack
2010-06-17 20:43             ` Erik Oomen
2010-06-18  5:47           ` Morgan Howe

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=20100615112936.5d03ce92@morgan \
    --to=mhowe@cwlinux.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).