Re: [Bug 10030] Suspend doesn't work when SD card is inserted

Pierre Ossman
2008-02-20T17:31:06Z

On Wed, 20 Feb 2008 11:42:56 -0500 (EST)
Alan Stern <stern@rowland.harvard.edu> wrote:

> >
> > ------- Comment #14 from rjw@sisk.pl 2008-02-19 15:23 -------
> > Thanks a lot for the debugging work!
> >
> > First, the patch triggers, which means that the problem discovered by Alan is
> > troubling us. [Alan, do you have an idea how to fix that cleanly?]
>
> I suggest we ask the maintainer for the MMC subsystem.
>
> Pierre, you can find the details in the bugzilla entry. Briefly,
> there's a pathway in the MMC core suspend routine (if the driver
> doesn't implement a resume hook) which could lead to the host being
> removed during a system suspend. This is an illegal operation and it
> will deadlock.
>
> Do you have a suggestion for a way to fix it?
>

Not really. But you have some things confused. What it checks is if the mmc bus handler (not a proper driver model, just a way of separating the MMC, SD and SDIO stuff) has a resume function. And if it doesn't, it removes the card (since it cannot revive it at resume).

So the only thing I can think of is to delay the removal until the resume routine, if that is safer.

Rgds
--
-- Pierre Ossman

Linux kernel, MMC maintainer http://www.kernel.org
PulseAudio, core developer http://pulseaudio.org
rdesktop, core developer http://www.rdesktop.org