This callback is definitely called only at passive level. WDF relies on
this for the very reasons I am recommending it to you. (The storage
stack relies on this to mark PAGEable code as non paged as well.) You
can block until your have cleared out of the selective suspend state.
Blocking in your callback will block the transition to Sx until you
return.
Yes, WDF is still in beta. I am not recommending that you use it now
for your driver. I am just saying that WDF uses the methods I am
recommending for the same task. USB SS support in WDF is implemented
and in the build, but no public sample uses it yet (we don’t have any
generic hardware to demonstrate it on). All you need to do to enable it
is call WdfDeviceAssignS0IdleSettings with an IdleCaps of
IdleUsbSelectiveSuspend.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Thursday, September 02, 2004 12:09 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] IRP_MN_QUERY_POWER for a System Power State
Callback idea is interesting but it seems as callback could be called at
DISPATCH_LEVEL, too. From docs it is unclear if it can occur also for
\Callback\PowerState. It would be a problem because I have to wait
somewhere until selective suspend is really cancelled to avoid race
conditions.
As for WDF, I examined DDK 3790.1218 and it seems as under
re-construction and not feasible for immediate use. The only USB sample
doesn’t contain selective suspend related code (commented out). Maybe
sometimes in the future but I need reliable driver just now. BTW, do you
plan to release WDF sources when it is final? Without them I would
hesitate to use it.
Best regards,
Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]
From:
xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
] on behalf of Doron Holan[SMTP:xxxxx@windows.microsoft.com]
Reply To: Windows System Software Devs Interest List
Sent: Thursday, September 02, 2004 7:01 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] IRP_MN_QUERY_POWER for a System Power State
You should get the S0 IIRC on a failed attempt to go to Sx, but WDF
uses
a callback object to basically do the same thing. A bit easier to
handle the async part as well.
You want to create one via ExCreateCallback w/a specific name, see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/kmarch/
hh/kmarch/k104_1e38a631-7e65-4b4b-8d51-3150a8073511.xml.asp
and then register it, ExRegisterCallback, see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/kmarch/
hh/kmarch/k102_db841434-fe00-448d-b5bb-2c35d1ad0ec4.xml.asp
You will get called when the system is going to Sx and when it moves
back into S0.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Wednesday, September 01, 2004 7:48 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] IRP_MN_QUERY_POWER for a System Power State
Once my driver receive this IRP which queries for S0 -> Sx transition,
it has to perform some actions which should be reverted on Sx -> S0
transition. However, some other driver can refuse query and system
remains in S0 state. DDK docs states Power Manager typically sends
IRP_MN_SET_POWER IRP to reaffirm S0. I’m uncertain if I can depend on
it. My question is: will be IRP_MN_QUERY_POWER for S0 -> S[1-4]always
followed by IRP_MN_SET_POWER for Sx -> S0? Presume system is powered
up
from lower Sx states sooner or later.
What I’m trying to solve are race conditions with selective suspend.
It
is disabled on mentioned query and has to be reenabled later. If query
is refused by some other driver and there isn’t reaffirmation IRP, our
device would stay powered and drain batteries. Please don’t tell me
about timer, I have it already there because code is originated from
DDK
sample and it is nightmare.
Best regards,
Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag
argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag
argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com