Re: [Query] mmc/sdhci: Suspend hangs if card is inserted at suspend.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux