Rich,
This does make some sense to me.
Although the messages from cardmgr are not pretty, your solution seems to get the important things right. Unmounting the card in the suspend script ensures that data is flushed to the card before power is removed from the card and that there are no IDE operations in flight when the power is removed from the card. That seems to sidestep the problem at the lowest level. Cardmgr is running its suspend script after resume, but there's nothing left to do. It does slow down the resume. I don't think there is an easy fix.
In the current framework, cardmgr should be an apm client so that it would get its suspend events from /dev/apm -- then the suspend could be delayed until cardmgr had run its scripts. At least, if we had /dev/apm fully implemented.
This may take significant kernel work, so maybe it is time for us to move our kernel development to 2.5.x.
Jamey
> -----Original Message-----
> From: Rich Warren [mailto:rwml@warrens.toythieves.com]
> Sent: Thursday, April 18, 2002 4:05 AM
> To: ipaq@handhelds.org
> Subject: [iPAQ] Finally beat the CF card into submission.
>
>
> OK, the more I work on this, the less I understand the way
> the Ipaq suspends
> and resumes.
>
> But at least I've got something that works. I used chmod -x
> ... to remove
> the cardctl script from the suspend scripts (and the one I
> had added to the
> resume scripts). I added a script that just unmounted my CF
> partitions and
> set it as S01unmount in the suspend-scripts. I then added a
> R50mount script
> to remount it in the resume scripts.
>
> I'm still getting oddness. When I connect using minicom and watch the
> messages as it suspends, I see some activity from the
> cardctrl. Then it goes
> dead.
>
> When I resume, the cardctrl tries to unmount my CF, then
> tries to mount it.
> However, unlike previous attempts, this time the CF mounts
> cleanly. So it
> must be getting unmounted properly.
>
> The card can take a few seconds to a minute to mount, but it comes up
> automatically. And I'm not getting any of the resume lock-ups
> I was getting
> before.
>
> So, it's not pretty, but it's working. Wish I knew what was
> going on under
> the hood more. The resume and suspend scripts don't seem real
> reliable. At
> least, the echo commands I placed in them never show up on
> the minicom
> console.
>
> If anyone wants more details on what I did, just let me know.
>
> -Rich-
> _______________________________________________
> Open Source Software for Compaq iPAQ Handhelds.
> iPAQ mailing list
> iPAQ@handhelds.org
> http://handhelds.org/mailman/listinfo/ipaq
> irc://irc.openprojects.net #ipaq
>
Received on Thu Apr 18 12:36:02 2002
This archive was generated by hypermail 2.1.8 : Tue May 04 2004 - 09:44:46 EDT