From: Viresh Kumar <viresh.kumar@st.com>
To: Chris Ball <cjb@laptop.org>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
Shiraz HASHIM <shiraz.hashim@st.com>,
Armando VISCONTI <armando.visconti@st.com>
Subject: Re: [Query] mmc/sdhci: Suspend hangs if card is inserted at suspend.
Date: Tue, 15 Nov 2011 11:16:41 +0530 [thread overview]
Message-ID: <4EC1FCC1.6070609@st.com> (raw)
In-Reply-To: <877h36hvki.fsf@laptop.org>
On 11/12/2011 8:54 AM, Chris Ball wrote:
> On Fri, Nov 11 2011, Viresh Kumar wrote:
>> > Controller specific suspend/resume are still not called, so i think it might
>> > be related to core code. I am using 2.6.37 kernel version.
>> >
>> > Any help on this?
> Please try to reproduce on 3.1 and let us know if it's present there.
Hi Chris,
Support for SPEAr13xx is not present on 3.1 and it will take some time to
move support there. I have a bit more info which might able you to guide us:
file: drivers/mmc/card/queue.c
static int mmc_queue_thread(void *d)
{
...
do {
req = blk_fetch_request(q);
...
if (!req) {
if (kthread_should_stop()) {
set_current_state(TASK_RUNNING);
break;
}
up(&mq->thread_sem);
schedule();
down(&mq->thread_sem);
continue;
}
set_current_state(TASK_RUNNING);
mq->issue_fn(mq, req);
} while (1);
...
}
- In normal cases, i.e. when we are able to stop this thread,
req is returned as NULL from blk_fetch_request()
- Suspend hang only occurs when the card is mounted.
- When suspend hangs, req is not returned as NULL and the card is
already removed by kernel and so we never check kthread_should_stop().
So it hangs.
--
viresh
next prev parent reply other threads:[~2011-11-15 5:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-11 6:45 [Query] mmc/sdhci: Suspend hangs if card is inserted at suspend Viresh Kumar
2011-11-12 3:24 ` Chris Ball
2011-11-15 5:46 ` Viresh Kumar [this message]
2011-11-15 6:57 ` Dong, Chuanxiao
2011-11-15 7:10 ` Viresh Kumar
2011-11-15 7:23 ` Dong, Chuanxiao
2011-11-15 8:11 ` Sujit Reddy Thumma
2011-11-17 17:46 ` Ulf Hansson
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=4EC1FCC1.6070609@st.com \
--to=viresh.kumar@st.com \
--cc=armando.visconti@st.com \
--cc=cjb@laptop.org \
--cc=linux-mmc@vger.kernel.org \
--cc=shiraz.hashim@st.com \
/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