> I have my own simplified processing model for the Power management
dispatch function for an Win2K WDM driver (PCI device). I found Walter
Oneys implementation a bit hard to follow and too comprehensive for my
application.
Perhaps it wasn’t too comprehensive ;=) Everyone I have talked to who knows
Power management mentions that this is one of the most difficult areas to
get right.
So far suspend/hibernate and shutdown works so that the
QUERY_POWER and SET_POWER IRP’s for System and Device IRP’s all appear
to work. However returning from hibernate/suspend causes a blue screen
with IRQL_NOT_LESS_OR_EQUAL. I essentially disable the device when I
power down and currently don’t do anything when it powers up (so it
should not cause interrupts or mind of it’s ISR is called). I’m
wondering if I screwed up the IRP completion somewhere. I know from
setting Bug Checks that my driver gets the Device SET power from D0 to
D3 when I come back up.
Do your really mean it sets the power from D0 to D3 when it comes back up?
Shouldn’t it set the power from D3 to D0?
One point I am not clear on is the save/restore or device context when
the device comes back up? I assume the device extension values are
restored for me.
I don’t think they are “restored”. They should still be valid though.
I don’t really care about the state of the devices
itself or any IRP’s.
Not sure what you mean. In D3 you are totally responsible for saving the
actual device’s context. If the device has been powered off, is there state
information at the device itself that you need to store before power off and
restore after power on?
Also, what else should I be using the remove lock
for? Is this only relevant for Power processing or does this somehow
relate to the PnP REMOVE_DEVICE IRP’s?
Yes.
Marc Reinig
System Solutions
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com