Re: Why not eject on suspend?

From: John Gordon <john_94501.a.t.yahoo.com>
Date: Wed Aug 27 2003 - 21:56:51 EDT

Hello,

> P.S. to my other reply to this...
> I've just been editing the pm_callback code, and something occurred to
> me. If I understand correctly, mmc_eject() just sort of enqueues an
> eject command. As I've got the code ATM, g_mmc_dev.suspended is set to
> 1 immediately after the call(s) to mmc_eject, presumably before the
> "real" eject. It seems to me that this might cause a problem. What do
> you think?

Yes, IIRC, the eject is essentially called from interrupt level and causes a
tasklet to run to complete the work. That actually might be the reason why it
doesn't work - the suspend of the CPU will probably happen before the tasklets
get to run.

> Presumably a "suspending" flag could be used to tell the real eject code
> to set g_mmc_dev.suspended after it's done it's thing.

Yes, but that might be harder to do in an environment that supports n cards
(which the code is written to handle). The last card would need to set the
global suspended flag.

TTFN,
John...

> On Thursday 28 August 2003 07:57, John Gordon quoth thusly:
> > > Do you know (and if so can you please explain) why the MMC/SD eject
> > > is done upon resuming rather than suspending?
> >
> > No, I wondered about that too, but saw your comment about the
> > alternative not working and decided to leave it be. It might be
> > simply a sequencing thing in the PM callbacks, though since MMC
> > happens pretty early that seems unlikely.
> >
> > Might try looking into that once I have my sleeve battery visible
> > again ;-)
> >
> > TTFN,
> > John...
> >
> >
> > =====
> > Linux, NetBSD, VxWorks and more ----> http://www.blueDonkey.org
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site design software
> > http://sitebuilder.yahoo.com
>

=====
Linux, NetBSD, VxWorks and more ----> http://www.blueDonkey.org

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
Received on Thu Aug 28 01:57:18 2003

This archive was generated by hypermail 2.1.8 : Tue May 04 2004 - 09:46:06 EDT