Re: SD card and File System in WinCE 5....?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi Graeme
My point is unload/reload the driver will cause system to broadcast a
device changed message. The App have a thread for polling the message, when
get the message , the App will determine "Is it card-insert?" or "Is it
card-eject?".
Because when unload/reload SD client driver , parse the device change
message, we can get card eject/insert information.
So if App is running ,suspend and then resume the system, if we unload and
then reload the SD client driver, the App will get card-eject message, then
App will pop a message to notify user that the SD card is removed. It will
cause the user a confusion,because the sd card is still in the card slot.
So could you give me another suggestion.?

BR
Jack


"Graeme Wintle" wrote:

Typically when you susend/resume you can safely shut down your SD driver and
restart it without any issues to the application, the reason for this is if
the filesystem finds any IO operations fail it waits for a set amount of
time, then re-tries, this is to handle suspend and resume where the driver
beneath the filesystem is not ready yet. This timeout is set from the
registry and is hardcoded, only one re-retry is allowed. It is assumed that
on this second attempt your driver have started back up from a suspend.

You can see this if you quickly remove and insert your sdcard the filesystem
doesn't remove the "SDCARD" folder.

The major drawback of this method is that if the timeout is too short you
application (say its media player) will fail after a resume as the
filesystem tried to read from the sdcard before the driver was ready. If the
timeout is set too long media will hang whilst the filesystem is doing this
Sleep(timeout) statement!

The resgitry entry you may want to google is:

[HKEY_LOCAL_MACHINE\System\StorageManager]
"PNPUnloadDelay"=dword:1000
"PNPWaitIODelay"=dword:1000

Hope that helps!

--
--
GraemeW
Web - http://www.bytesnap.co.uk
Blog - http://ce4all.blogspot.com

"Jack.S" <JackS@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:180C01A6-5B71-446C-9052-84E72B4CD276@xxxxxxxxxxxxxxxx
Hi all
I am developing SD card driver (SD Host,SD Bus, SD Client), the SD Bus and
SD Client Drivers are got from \PUBLIC\COMMON\OAK\DRIVERS\SDCARD\...
Now ,I am facing a serial problem, and have no idea to solve it.
The condition is:
When system suspend and resume , we dont want unload and reload SD Cleint
Driver,the reason is if the App is running and read/write data from/to SD
card, we hope the App is keeping running, not broken by resume
system.(Unload
or reload will cause system to broadcast a device changed message, we dont
want to get it)
In SD host driver,my method is when system resume ,I call the function
SDHCDIndicateSlotStateChange(m_pHCContext, 0, SlotResetRequest);
And I do a test , that is "I do a file copy/paste by File Explore", but
it
always failed.
I check the data of SD card, it is integrity and identical , nothing lose.
And I do other test, that I execute a App(the App is a multimedia tool) to
read/write data to SD.
When reading/writing from/to SD card, I suspend and resume the system ,
the
App is keeping playing.
So I am confused, what happened to it? I really have no idea about it...
Could some one help me? ...
BRs
Jack



.



Relevant Pages

  • Re: SD card and File System in WinCE 5....?
    ... Your app should be aware of this and not ... erroneously tell the user that a real card change has taken place. ... Because when unload/reload SD client driver, ... beneath the filesystem is not ready yet. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: SD card and File System in WinCE 5....?
    ... time, then re-tries, this is to handle suspend and resume where the driver ... beneath the filesystem is not ready yet. ... Driver,the reason is if the App is running and read/write data from/to SD ... card, we hope the App is keeping running, not broken by resume ...
    (microsoft.public.windowsce.platbuilder)
  • XP SP2 WDM driver - Sharing Memory between driver and application
    ... Windows to Linux just because I can't make a WDM driver for my PCI ... I have a motion control PCI card that can command 2 motors. ... The only big problem is that I need to share 10 buffers between the ... driver and the user app. ...
    (microsoft.public.development.device.drivers)
  • RE: [UPDATED PATCH] EFI support for ia32 kernels
    ... >> reuse a single driver image for multiple architectures assuming there ... As one of the people responsible for the EFI Specification and our ... Perhaps the UNDI network card interface that Intel developed ... BIOS can't shadow that much ROM code. ...
    (Linux-Kernel)
  • Re: Linux, X, ld, gcc, linking, shared libraries and stuff
    ... >> because, originally, video cards / system RAM could NOT afford to have ... > GL actually "copies" everything, but it's done by the graphics card, so ... > anyway if it's not hardware accelerated. ... installed the proper driver, then it zooms around the screen... ...
    (alt.lang.asm)