From: Konstantin Dorfman <kdorfman@codeaurora.org>
To: cjb@laptop.org
Cc: sthumma@codeaurora.org, linux-arm-msm@vger.kernel.org,
linux-mmc@vger.kernel.org, merez@codeaurora.org,
Konstantin Dorfman <kdorfman@codeaurora.org>
Subject: [RFC/PATCH] mmc: core: fix HPI polling timeout
Date: Mon, 13 May 2013 11:28:42 +0300 [thread overview]
Message-ID: <1368433722-17503-1-git-send-email-kdorfman@codeaurora.org> (raw)
In-Reply-To: <n>
Out of CPU time for the MMC context included into measured timeout. System
under heavy load will easily exceed out_of_int_time (typically 20 ms).
In this case real card status checked again and error reported for wrong
card state only.
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
Signed-off-by: Sujith Reddy Thumma <sthumma@codeaurora.org>
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index c40396f..4d06ada 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -630,8 +630,11 @@ int mmc_interrupt_hpi(struct mmc_card *card)
if (!err && R1_CURRENT_STATE(status) == R1_STATE_TRAN)
break;
- if (time_after(jiffies, prg_wait))
- err = -ETIMEDOUT;
+ if (time_after(jiffies, prg_wait)) {
+ err = mmc_send_status(card, &status);
+ if (!err && R1_CURRENT_STATE(status) != R1_STATE_TRAN)
+ err = -ETIMEDOUT;
+ }
} while (!err);
out:
--
1.7.6
--
Konstantin Dorfman,
QUALCOMM ISRAEL, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
reply other threads:[~2013-05-13 8:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1368433722-17503-1-git-send-email-kdorfman@codeaurora.org \
--to=kdorfman@codeaurora.org \
--cc=cjb@laptop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=merez@codeaurora.org \
--cc=sthumma@codeaurora.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).