Re: Suspend in critical code



Check the power manager documentation in CE help. There may be some IOCTL's
that your driver can implement that are called by the power manager when it
wants to change states. I have never tried this, so I don't know how well it
works.

When the system begins a suspend, the PowerDown function of your drivers is
called. The system is single threaded at this point. Therefore, if there is
something you want to wait upon within a particular power function of a the
pertinent driver, then you can wait for that to occur and the system won't
power down until you return from the power function. But keep in mind you
are single-thread, so you must be able to monitor whatever you need to
within the current thread of execution.

--
Michael Schaffner, P.E.
Senior Software Engineer
Windows CE Technical Group
Applied Data Systems


"fd" <demo@xxxxxxxx> wrote in message
news:eGXiHDU4FHA.1184@xxxxxxxxxxxxxxxxxxxxxxx
>I would like to know if a mechanism exist in CE 5.0 to be sure that some
>critical executing code is terminated before a suspend occurs.
>
> For example, take a flash driver doing a critical write or read access
> that needs to be completed executed before going in suspend mode.
>
> I saw this problem when I was executing RW_ALL test on my Nand flash
> driver. I then force a suspend during the test and with some debugging
> code I saw a suspend inside my critical code.
>
> I know that RW_ALL use DeviceIOControl to do the test, but maybe some
> Database will do the same and it will result with data corruption.
>
>
>
> Any Idea How to fix this suspend behavior?
>
>
>
>


.



Relevant Pages

  • Re: General network driver suspend/resume (was e1000 carrier related)
    ... 7.3* version of the driver from sourceforge. ... the cards itself are in low power state when down. ... beware that e1000 needs to save pci msi config space on top of the normal pci config ...
    (Linux-Kernel)
  • Re: General network driver suspend/resume (was e1000 carrier related)
    ... 7.3* version of the driver from sourceforge. ... Changing this to bring up the link would make the card start to consume lots more power, which would automatically suck enormously for anyone using a laptop. ... Perhaps this needs to be fixed upstream in pci_save_state for msi devices, but the api for msi is not capable of detecting this atm. ...
    (Linux-Kernel)
  • General network driver suspend/resume (was e1000 carrier related)
    ... 7.3* version of the driver from sourceforge. ... the cards itself are in low power state when down. ... The standard which all network drivers should use is: ...
    (Linux-Kernel)
  • Re: Totally broken PCI PM calls
    ... And we need partial tree suspend for that. ... cold most of the time as the system will remove power). ... driver must refuse suspend if it can't do it. ... So the driver decision of what state to enter into and how to wakeup ...
    (Linux-Kernel)
  • Re: suspend resume results os freeze
    ... I think you can use a force PCMCIA eject during the power transitions. ... Previously, I was not able to detect WLAN card after suspend resume, ... By that way I was able to reload the driver after resuming. ...
    (microsoft.public.windowsce.platbuilder)