Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to handle with SD driver when suspend and resume

14 views
Skip to first unread message

Nicolas

unread,
Apr 28, 2007, 10:24:01 PM4/28/07
to
Dear all,
I have a question, how to hand with SD driver when suspend and resume.

my way is that when suspen, SD power will be cut off, so when resume,
controller diriver will unlode the client driver and then if find the SD
card is still in the slot, the client driver will be loaded again,

but now, I find when resume with sd card in, the storage card folder will
disappear and appear again, that means filesystem recognized this unload and
load action, how to increase unload and load speed to avoid filesystem to
find unload and load action??

Rob Nock

unread,
Apr 30, 2007, 5:34:09 AM4/30/07
to
Nicolas,

More of a question rather than an answer. How do you know the user has not
changed the SD card whilst in suspend? Surely it is safer to keep the
unload/load action.

--Rob
Blog: https://ce4all.blogspot.com

"Nicolas" <Nic...@discussions.microsoft.com> wrote in message
news:DBF2C845-B67A-45E9...@microsoft.com...

GraemeW

unread,
Apr 30, 2007, 7:58:08 AM4/30/07
to
There are two FATFS registry settings which affect this behaviour. Also
these are the reason why after a resume an SDCard can take 12 seconds to
become responsive again if a ReadFile operation was called when the driver
was powering down for the suspend.

"PNPUnloadDelay"
Specifies the time delay in milliseconds between unmounting and
detaching a device.

Used during suspend/resume cycles where a block driver might unload
and reload on resume.

Default is 5000 microseconds.

"PnPWaitIoDelay"
Specifies the amount of time waited before re-trying an I/O operation
on an unavailable device.

This subkey is not present in the default registry, but may be added
by the OEM. If this value is not specified, it is assumed to be three times
that of PNPUnloadDelay

See :


http://msdn2.microsoft.com/en-us/library/aa912238.aspx


The default timeout is set in CE5.0 as 4 seconds to unmount the volume after
device removal, this is the delay you see in explorer for the sdcard to be
removed after you have physically removed the card. And 3 x 4 seconds if any
IO operation fails (i.e. if an app is reading/writing to an SDCard whilst
the device is suspending/resuming)


--
GraemeW
Blog - http://ce4all.blogspot.com

"Nicolas" <Nic...@discussions.microsoft.com> wrote in message
news:DBF2C845-B67A-45E9...@microsoft.com...

0 new messages