From: Sahitya Tummala <stummala@codeaurora.org>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: David Brown <davidb@codeaurora.org>,
linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org,
Chris Ball <cjb@laptop.org>
Subject: Re: [RFC] MMC: error handling improvements
Date: Tue, 01 Mar 2011 18:58:41 +0530 [thread overview]
Message-ID: <1298986121.15439.16.camel@stummala-linux.in.qualcomm.com> (raw)
In-Reply-To: <20110219150006.GH29493@n2100.arm.linux.org.uk>
Hi Russell King,
On Sat, 2011-02-19 at 15:00 +0000, Russell King - ARM Linux wrote:
> On Tue, Feb 15, 2011 at 03:49:04PM -0800, David Brown wrote:
> > On Tue, Feb 15 2011, Russell King - ARM Linux wrote:
> >
> > > This patch is for RFC only; it needs splitting up somewhat. However, I
> > > wanted to get it out there for some comment.
> >
> > Just for kicks, I applied this and ran it on an MSM target (8x50). It
> > seems to cause lots of:
> >
> > mmc0: Data timeout
> > mmc0: Controller has been re-initialized
> > ...
> > mmc0: Data CRC error
> >
> > and I can post more if you would find them interesting. Eventually the
> > MSM mmc driver derefernces a null pointer in the interrupt code.
>
> That doesn't look right. If resetting the MMC controller results in all
> state being lost, it presumably means the card gets powered down too.
> If that happens, the card needs to be reinitialized from scratch again,
> and I don't see how that happens in this driver.
>
> Nothing in this patch should cause data timeouts to appear where they
> weren't already appearing before the patch - the patch only changes
> what happens after an error occurs, so you must already be encountering
> errors on the interface before you applied this patch.
This patch sends CMD22 (mmc_sd_num_wr_blocks()) for SD cards after a
write command. This function relies on csd->tacc_ns and csd->tacc_clks
for setting timeout values. But for SDHC cards, these CSD values are not
read and will always be 0. The host driver will only use the timeout
values sent by upper layers and thus in this case we are writing 0 to
MMCIDATATIMER. This is the reason for getting data timeout error for
CMD22. Before sending CMD22 if I add mmc_set_data_timeout(), then it is
working fine for me because mmc_set_data_timeout() uses hardcoded
timeout values for SDHC cards.
All other SD read commands are also using mmc_set_data_timeout() to set
the timeout values - mmc_sd_switch(), mmc_app_sd_status() and
mmc_app_send_scr(). I think it is a problem in mmc_sd_num_wr_blocks to
use CSD contents for timeout values for all types of SD cards.
--
Thanks,
Sahitya.
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
Forum.
next prev parent reply other threads:[~2011-03-01 13:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-15 23:03 [RFC] MMC: error handling improvements Russell King - ARM Linux
2011-02-15 23:49 ` David Brown
2011-02-16 18:41 ` Linus Walleij
2011-02-16 19:28 ` David Brown
2011-02-16 21:01 ` Linus Walleij
2011-02-16 23:06 ` Brian Swetland
2011-02-18 13:03 ` Linus Walleij
2011-02-18 16:04 ` Brian Swetland
2011-02-21 20:49 ` Linus Walleij
[not found] ` <AANLkTimpJUoc64py_jCrvsrXscawsR2c7JBtr1e0U+e8@mail.gmail.com>
2011-03-01 18:39 ` Fwd: " Murali Krishna Palnati
2011-03-01 20:22 ` Russell King - ARM Linux
2011-03-02 10:12 ` Linus Walleij
2011-02-19 15:00 ` Russell King - ARM Linux
2011-03-01 13:28 ` Sahitya Tummala [this message]
2011-02-16 19:01 ` Pawel Moll
2011-02-17 10:40 ` Russell King - ARM Linux
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=1298986121.15439.16.camel@stummala-linux.in.qualcomm.com \
--to=stummala@codeaurora.org \
--cc=cjb@laptop.org \
--cc=davidb@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
/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