Again, please expose this through the WMI guid so a user has a way to
disable this behavior (denying the S state b/c you can’t wake). What
external impetus causes the wake? Is this something that the user truly
needs? Will data be lost forever that cannot be lost?
The ability to wake the machine purely for the sake of waking the
machine is not reason enough to do it.
D
This posting is provided “AS IS” with no warranties, and confers no
rights.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of rahul gupta
Sent: Thursday, February 12, 2004 10:47 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Power Management in Cypress EZ USB FX
Thanks !!
for such a great discussion.
Since my device is furhter connected to a transducer it can get data
anytime and hence should always be enabled to remotely wake up host.
I will have to stop my system to go in power states deeper than the
systemwake.
(As Doran suggested).
Rahul Gupta
On Wed, 2004-02-11 at 22:42, Doron Holan wrote:
You device always supports D0. The D states in the mapping table are
the *deepest* D states the device can go into for that state, not the
lightest states. This means that when you get an S0 irp, you should
map
it to a D0 state. As a general rule, you should only need to look at
DeviceWake and SystemWake. The table is the raw information from
which
these 2 values are set for you.
As for denying S3 because you can’t wake the machine, this is a
dangerous game to play. Imagine that there is another driver on the
machine that can only wake from S3 and not S1 and it has the same
logic
as yours (deny S1 so that it can wake from S3). Now the machine can’t
go into any sleep state b/c both of the drivers are mutually exclusive
in terms of their power needs. (As an aside, if you are going to fail
system states, you need to do this in query power, not set power.
Once
you get a set power you *must* respect it).
So, what you should do is register the GUID_POWER_DEVICE_WAKE_ENABLE.
It’s buffer is a BOOLEAN. This guid corresponds to the Power
management
tab in device manager. This allows a user to control if your device
wake’s the machine or not. This way, a user can get out of the stuck
situation.
Your system state power management code looks like this
If (query system S state is deeper then wake S state && wake enabled)
Fail query
If (set S state is deeper then wake S state)
Request D3 irp
Else if (set s State is = or lighter then wake s state)
If (wake enabled)
Request wait wake irp
Request D2 (or whatever DeviceWake is)
Else
Request D3
Now you will also have to deal with canceling the wake request when
you
come back into D0 and you didn’t wake the machine.
D
This posting is provided “AS IS” with no warranties, and confers no
rights
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of rahul gupta
Sent: Wednesday, February 11, 2004 6:28 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Power Management in Cypress EZ USB FX
Hi,
I am implementing Power Management in my driver for Cypress EZUSB FX
based device on windows 2000. (I have put a firmware on the board,
where
“remote wakeup” bit has been enabled)
I receive following values for device capabilities in my driver.
Array of SystemState
SystemUndefined DeviceUndefined
S0 D2
S1 D2
S2 D3
S3 D3
S4 D3
S5 D3
DeviceWake D2
SystemWake S1
WakeFromD2 1
My Questions:
-
Where is the working Device Power State “PowerDeviceD0”?
-
This device does support remote wakeup (DDK says that if DeviceWake
and SystemWake are both NON zero, then remote wakeup is supported).
However, on going to StandBy, I receive power IRP for S3 state. Should
the device be allowed to go to StandBy, even though SystemWake is S1.
-
When I send my host to standby which is S3 state on my host, I have
to request a Power IRP for device state D3.
On Resume (From the Standby button on host), I power up my host to S0
and the device to D2 (as per mapping).
But the device is not fully powered up and hence cannot be accessed.
Should I set my device state to D0, even when the deviceCap does not
support D0.
TIA
Rahul
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
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: xxxxx@dcmtech.co.in
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: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com