PCMCIA card and resume from suspend

Hi everyone,

I’m updating an old VxD driver to WDM for a PCMCIA card. I’m using a
slightly modified version of one of Walt Oney’s samples from his WDM book.

Everything seems to be working ok except when I come back from a suspend
state. The “status” function of the card, which just reads two bytes
from an I/O port, returns an incorrect value (0xFFFF) after the system
comes back from being suspended.

But if I disable and enable the card (which causes me to process a
REMOVE_DEVICE and START_DEVICE), then everything works properly again.
Is there a way to do the equivalent (trigger a REMOVE/START_DEVICE) when
I get back to the normal power state? I think I just need the bus
driver to restart/reinitialize the card, but I don’t know how to request
this from the bus driver.

Thanks for any help,

David

> Is there a way to do the equivalent (trigger a REMOVE/START_DEVICE) when

I get back to the normal power state? I think I just need the bus

Yes. The device set power IRP - from D0 to Dn is going powerdown, from Dn to D0
is awaken.

You must do the reinit in the awaken path.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

Hi Maxim,

I understand what you’re saying - the correct place to do this reinit is
at these power state transition points. But I don’t know how to
actually do the reinit: I don’t have enough information about the
hardware itself to do so directly, but it seems that having the bus
reinitialize the device works just fine.

So how do I either generate a STOP[START]_DEVICE myself, or force the
bus to restart/reassign the device?

Thanks,

David

Maxim S. Shatskih wrote:

>Is there a way to do the equivalent (trigger a REMOVE/START_DEVICE) when
>I get back to the normal power state? I think I just need the bus

Yes. The device set power IRP - from D0 to Dn is going powerdown, from Dn to D0
is awaken.

You must do the reinit in the awaken path.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

Getting a stop/start sent to your device to reinitialize it every time
you power up is not the right thing to do. Whatever hw initialization
you do in START_DEVICE, you should do in your set device D0 completion
routine as well.

Obligatory plug: if you are going through the effort of rewriting the
driver, you should really consider KMDF (kernel mode driver framework).
It will remove the complexity from your code with respect to how/when to
power up your device.

D

(to get a stop irp sent to you, invalidate your device state via
IoInvalidateDeviceState, handle IRP_MJ_PNP/IRP_MN_QUERY_PNP_DEVICE_STATE
and set PNP_DEVICE_RESOURCE_REQUIREMENTS_CHANGED and PNP_DEVICE_FAILED,
but like I said, this is not the way to solve your problem)

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David Lavo
Sent: Wednesday, November 09, 2005 5:14 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] PCMCIA card and resume from suspend

Hi Maxim,

I understand what you’re saying - the correct place to do this reinit is

at these power state transition points. But I don’t know how to
actually do the reinit: I don’t have enough information about the
hardware itself to do so directly, but it seems that having the bus
reinitialize the device works just fine.

So how do I either generate a STOP[START]_DEVICE myself, or force the
bus to restart/reassign the device?

Thanks,

David

Maxim S. Shatskih wrote:

>Is there a way to do the equivalent (trigger a REMOVE/START_DEVICE)
when
>I get back to the normal power state? I think I just need the bus

Yes. The device set power IRP - from D0 to Dn is going powerdown, from
Dn to D0
is awaken.

You must do the reinit in the awaken path.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.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@microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

David Lavo wrote:

I understand what you're saying - the correct place to do this reinit
is at these power state transition points. But I don't know how to
actually do the reinit: I don't have enough information about the
hardware itself to do so directly, but it seems that having the bus
reinitialize the device works just fine.

So how do I either generate a STOP[START]_DEVICE myself, or force the
bus to restart/reassign the device?

I'd like to expand just a bit on Doron's reply to emphasize the
disconnect here.

STOP_DEVICE and START_DEVICE are not commands to the hardware or to the
bus. Rather, they are simply messages that tell you that something
happened. If your device gets fixed up during START_DEVICE processing,
that means that YOUR DRIVER fixed it up in its START_DEVICE handler.
That suggests that you need to run your START_DEVICE handler when you
come out of suspend.

Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

I think my question was badly phrased, since I didn’t mean to imply that
my START_DEVICE handler could fix up the hardware. My START_DEVICE code
is pretty simple - parse the assigned resources, save them off and map
the memory space.

My *guess* is that the hardware is getting into an invalid state when it
returns from suspend. By disabling and re-enabling the device, I
imagine that the bus is going through the normal re-initialization and
querying of the hardware and that is enough to reset it to a valid
state. Since I don’t (yet) have any docs about the hardware at all, I
don’t know if this a valid guess, but what else does a disable/enable
cycle do?

Thanks …

Tim Roberts wrote:

David Lavo wrote:

>
> I understand what you’re saying - the correct place to do this reinit
> is at these power state transition points. But I don’t know how to
> actually do the reinit: I don’t have enough information about the
> hardware itself to do so directly, but it seems that having the bus
> reinitialize the device works just fine.
>
> So how do I either generate a STOP[START]_DEVICE myself, or force the
> bus to restart/reassign the device?

I’d like to expand just a bit on Doron’s reply to emphasize the
disconnect here.

STOP_DEVICE and START_DEVICE are not commands to the hardware or to the
bus. Rather, they are simply messages that tell you that something
happened. If your device gets fixed up during START_DEVICE processing,
that means that YOUR DRIVER fixed it up in its START_DEVICE handler.
That suggests that you need to run your START_DEVICE handler when you
come out of suspend.

I’m no PCMCIA expert, but your problem does look familiar.

When you get a resume S-IRP (S0) are you requesting and then passing a
D0 IRP down the stack? You must then wait for the bus driver to
complete the D-IRP, and only then re-initializing your device after the
bus driver has turned on the device? I’d bet the remove, then add is
working because the PNP path is acceptably implemented, but the PM side
is not.

MKE.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David Lavo
Sent: Wednesday, November 09, 2005 4:07 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] PCMCIA card and resume from suspend

I think my question was badly phrased, since I didn’t mean to imply that

my START_DEVICE handler could fix up the hardware. My START_DEVICE code

is pretty simple - parse the assigned resources, save them off and map
the memory space.

My *guess* is that the hardware is getting into an invalid state when it

returns from suspend. By disabling and re-enabling the device, I
imagine that the bus is going through the normal re-initialization and
querying of the hardware and that is enough to reset it to a valid
state. Since I don’t (yet) have any docs about the hardware at all, I
don’t know if this a valid guess, but what else does a disable/enable
cycle do?

Thanks …

Tim Roberts wrote:

David Lavo wrote:

>
> I understand what you’re saying - the correct place to do this reinit

> is at these power state transition points. But I don’t know how to
> actually do the reinit: I don’t have enough information about the
> hardware itself to do so directly, but it seems that having the bus
> reinitialize the device works just fine.
>
> So how do I either generate a STOP[START]_DEVICE myself, or force the

> bus to restart/reassign the device?

I’d like to expand just a bit on Doron’s reply to emphasize the
disconnect here.

STOP_DEVICE and START_DEVICE are not commands to the hardware or to
the
bus. Rather, they are simply messages that tell you that something
happened. If your device gets fixed up during START_DEVICE
processing,
that means that YOUR DRIVER fixed it up in its START_DEVICE handler.
That suggests that you need to run your START_DEVICE handler when you
come out of suspend.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@intel.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Hi Michael,

I think the PM code is ok - I’m using almost completely unchanged sample
code from Walter Oney’s book, and it does exactly as you describe. But,
I’m not doing anything with my hardware at the usual point (at the D0
IRP completion routine) to re-initialize it. The fact is, I don’t have
any docs on this hardware, so I don’t know what I can do in the driver
to get it back to a valid state.

The PNP path in my driver, as I mentioned, really only does boilerplate
operations also - parse out and save the memory and port resources, map
the memory space. The sanity check that fails after a suspend/resume
just reads 2 bytes from one of the ports.

Since all the initialization my driver does is handle I/O resource
assignments, is this something that is usually done again after a resume
to D0? I’m just re-using the same port and memory values after the
resume as I was before the suspend, except they (at least the port
access) no longer work after resume.

Thanks,

David

Eschmann, Michael K wrote:

I’m no PCMCIA expert, but your problem does look familiar.

When you get a resume S-IRP (S0) are you requesting and then passing a
D0 IRP down the stack? You must then wait for the bus driver to
complete the D-IRP, and only then re-initializing your device after the
bus driver has turned on the device? I’d bet the remove, then add is
working because the PNP path is acceptably implemented, but the PM side
is not.

MKE.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David Lavo
Sent: Wednesday, November 09, 2005 4:07 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] PCMCIA card and resume from suspend

I think my question was badly phrased, since I didn’t mean to imply that

my START_DEVICE handler could fix up the hardware. My START_DEVICE code

is pretty simple - parse the assigned resources, save them off and map
the memory space.

My *guess* is that the hardware is getting into an invalid state when it

returns from suspend. By disabling and re-enabling the device, I
imagine that the bus is going through the normal re-initialization and
querying of the hardware and that is enough to reset it to a valid
state. Since I don’t (yet) have any docs about the hardware at all, I
don’t know if this a valid guess, but what else does a disable/enable
cycle do?

Thanks …

Tim Roberts wrote:

>David Lavo wrote:
>
>
>>I understand what you’re saying - the correct place to do this reinit

>>is at these power state transition points. But I don’t know how to
>>actually do the reinit: I don’t have enough information about the
>>hardware itself to do so directly, but it seems that having the bus
>>reinitialize the device works just fine.
>>
>>So how do I either generate a STOP[START]_DEVICE myself, or force the

>>bus to restart/reassign the device?
>
>
>I’d like to expand just a bit on Doron’s reply to emphasize the
>disconnect here.
>
>STOP_DEVICE and START_DEVICE are not commands to the hardware or to

the

>bus. Rather, they are simply messages that tell you that something
>happened. If your device gets fixed up during START_DEVICE

processing,

>that means that YOUR DRIVER fixed it up in its START_DEVICE handler.
>That suggests that you need to run your START_DEVICE handler when you
>come out of suspend.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@intel.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

If your start device initialization code isn’t touching the hardware,
why are you touching it later? If you don’t have hw specs, how do you
know what hw to touch at all? How do you know that reading your ports
and getting 0xFFFF is not expected? Until you get the hw spec, you are
going to just chase your own tail trying to get this to work.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David Lavo
Sent: Wednesday, November 09, 2005 5:37 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] PCMCIA card and resume from suspend

Hi Michael,

I think the PM code is ok - I’m using almost completely unchanged sample

code from Walter Oney’s book, and it does exactly as you describe. But,

I’m not doing anything with my hardware at the usual point (at the D0
IRP completion routine) to re-initialize it. The fact is, I don’t have
any docs on this hardware, so I don’t know what I can do in the driver
to get it back to a valid state.

The PNP path in my driver, as I mentioned, really only does boilerplate
operations also - parse out and save the memory and port resources, map
the memory space. The sanity check that fails after a suspend/resume
just reads 2 bytes from one of the ports.

Since all the initialization my driver does is handle I/O resource
assignments, is this something that is usually done again after a resume

to D0? I’m just re-using the same port and memory values after the
resume as I was before the suspend, except they (at least the port
access) no longer work after resume.

Thanks,

David

Eschmann, Michael K wrote:

I’m no PCMCIA expert, but your problem does look familiar.

When you get a resume S-IRP (S0) are you requesting and then passing a
D0 IRP down the stack? You must then wait for the bus driver to
complete the D-IRP, and only then re-initializing your device after
the
bus driver has turned on the device? I’d bet the remove, then add
is
working because the PNP path is acceptably implemented, but the PM
side
is not.

MKE.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David Lavo
Sent: Wednesday, November 09, 2005 4:07 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] PCMCIA card and resume from suspend

I think my question was badly phrased, since I didn’t mean to imply
that

my START_DEVICE handler could fix up the hardware. My START_DEVICE
code

is pretty simple - parse the assigned resources, save them off and map

the memory space.

My *guess* is that the hardware is getting into an invalid state when
it

returns from suspend. By disabling and re-enabling the device, I
imagine that the bus is going through the normal re-initialization and

querying of the hardware and that is enough to reset it to a valid
state. Since I don’t (yet) have any docs about the hardware at all, I

don’t know if this a valid guess, but what else does a disable/enable
cycle do?

Thanks …

Tim Roberts wrote:

>David Lavo wrote:
>
>
>>I understand what you’re saying - the correct place to do this reinit

>>is at these power state transition points. But I don’t know how to
>>actually do the reinit: I don’t have enough information about the
>>hardware itself to do so directly, but it seems that having the bus
>>reinitialize the device works just fine.
>>
>>So how do I either generate a STOP[START]_DEVICE myself, or force the

>>bus to restart/reassign the device?
>
>
>I’d like to expand just a bit on Doron’s reply to emphasize the
>disconnect here.
>
>STOP_DEVICE and START_DEVICE are not commands to the hardware or to

the

>bus. Rather, they are simply messages that tell you that something
>happened. If your device gets fixed up during START_DEVICE

processing,

>that means that YOUR DRIVER fixed it up in its START_DEVICE handler.
>That suggests that you need to run your START_DEVICE handler when you
>come out of suspend.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@intel.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@microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Hi Doran,

I’m not touching the hardware (for initialization purposes) either at
START_DEVICE or at resume to D0. That is why I suspect that the
interaction with the bus controller/driver is what is setting the card
to a valid state, and not what I’m doing in the function driver.

I agree that the lack of documentation is the real problem. I’ve
requested it from the client for about a week now, without any result.
This is hardware that dates from the Win95 era, and has not been updated
since then, so I assume the card was not designed for, and has never
been tested with, Windows power management.

The only “documentation” I have is a simple test app that performs the
2-byte port read as a sanity check first thing, and always expects the
same value. That is why I suspect that 0xFFFF is not expected, and
there seems to be no other device setup required or used for the check.

– David

Doron Holan wrote:

If your start device initialization code isn’t touching the hardware,
why are you touching it later? If you don’t have hw specs, how do you
know what hw to touch at all? How do you know that reading your ports
and getting 0xFFFF is not expected? Until you get the hw spec, you are
going to just chase your own tail trying to get this to work.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David Lavo
Sent: Wednesday, November 09, 2005 5:37 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] PCMCIA card and resume from suspend

Hi Michael,

I think the PM code is ok - I’m using almost completely unchanged sample

code from Walter Oney’s book, and it does exactly as you describe. But,

I’m not doing anything with my hardware at the usual point (at the D0
IRP completion routine) to re-initialize it. The fact is, I don’t have
any docs on this hardware, so I don’t know what I can do in the driver
to get it back to a valid state.

The PNP path in my driver, as I mentioned, really only does boilerplate
operations also - parse out and save the memory and port resources, map
the memory space. The sanity check that fails after a suspend/resume
just reads 2 bytes from one of the ports.

Since all the initialization my driver does is handle I/O resource
assignments, is this something that is usually done again after a resume

to D0? I’m just re-using the same port and memory values after the
resume as I was before the suspend, except they (at least the port
access) no longer work after resume.

Thanks,

David

Eschmann, Michael K wrote:

>I’m no PCMCIA expert, but your problem does look familiar.
>
>When you get a resume S-IRP (S0) are you requesting and then passing a
>D0 IRP down the stack? You must then wait for the bus driver to
>complete the D-IRP, and only then re-initializing your device after

the

>bus driver has turned on the device? I’d bet the remove, then add

is

>working because the PNP path is acceptably implemented, but the PM

side

>is not.
>
>MKE.
>
>
>-----Original Message-----
>From: xxxxx@lists.osr.com
>[mailto:xxxxx@lists.osr.com] On Behalf Of David Lavo
>Sent: Wednesday, November 09, 2005 4:07 PM
>To: Windows System Software Devs Interest List
>Subject: Re:[ntdev] PCMCIA card and resume from suspend
>
>I think my question was badly phrased, since I didn’t mean to imply

that

>my START_DEVICE handler could fix up the hardware. My START_DEVICE

code

>is pretty simple - parse the assigned resources, save them off and map

>the memory space.
>
>My *guess* is that the hardware is getting into an invalid state when

it

>returns from suspend. By disabling and re-enabling the device, I
>imagine that the bus is going through the normal re-initialization and

>querying of the hardware and that is enough to reset it to a valid
>state. Since I don’t (yet) have any docs about the hardware at all, I

>don’t know if this a valid guess, but what else does a disable/enable
>cycle do?
>
>Thanks …
>
>
>Tim Roberts wrote:
>
>
>>David Lavo wrote:
>>
>>
>>
>>>I understand what you’re saying - the correct place to do this reinit
>
>
>>>is at these power state transition points. But I don’t know how to
>>>actually do the reinit: I don’t have enough information about the
>>>hardware itself to do so directly, but it seems that having the bus
>>>reinitialize the device works just fine.
>>>
>>>So how do I either generate a STOP[START]_DEVICE myself, or force the
>
>
>>>bus to restart/reassign the device?
>>
>>
>>I’d like to expand just a bit on Doron’s reply to emphasize the
>>disconnect here.
>>
>>STOP_DEVICE and START_DEVICE are not commands to the hardware or to
>
>the
>
>
>>bus. Rather, they are simply messages that tell you that something
>>happened. If your device gets fixed up during START_DEVICE
>
>processing,
>
>
>>that means that YOUR DRIVER fixed it up in its START_DEVICE handler.
>>That suggests that you need to run your START_DEVICE handler when you
>>come out of suspend.
>
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@intel.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@microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Ok,

I’ll admit it: you guys are pretty smart. Michael had it just about
right (below). The problem was in the PM handling of the power state
transition.

As I mentioned, I am using Walter Oney’s sample code pretty much
out-of-the-box. The problem was in the following function:

////////////////////////////////////////////////////////////////////////
// GetLowestDevicePowerState returns the lowest device power state
// that is consistent with a given system power state and the current
// wakeup state of the device.

DEVICE_POWER_STATE GetLowestDevicePowerState(PDEVICE_EXTENSION pdx,
SYSTEM_POWER_STATE sysstate)
{
DEVICE_POWER_STATE maxstate = pdx->devcaps.DeviceState[sysstate];
DEVICE_POWER_STATE minstate = PowerDeviceD3;

DEVICE_POWER_STATE dstate = minstate > maxstate ?
minstate : maxstate;

// TODO choose a different dstate here if you want to

return dstate;
}

A system resume transitions to system state PowerSystemWorking, in which
case maxstate is PowerDeviceD0 (value: 1) and minstate is PowerDeviceD3
(value: 4). The sample code above will always return PowerDeviceD3,
since 4 is the highest-valued device power state. In my driver, then,
the post-resume device state was PowerDeviceD3 (same as before) and so
the power IRP processing was short-circuited.

I don’t know if I’m interpreting the code correctly, but I imagine the
“minstate” variable is a global override for the devcaps setting. So I
changed the code to:

DEVICE_POWER_STATE dstate = maxstate > minstate ?
minstate : maxstate;

So if set minstate to PowerDeviceD2 (value: 3), I’m saying that the
lowest power state I want to go to (regardless of system state) is D2.
If the devcap value (maxstate) is D3, then the minstate value of D2 will
be used instead as the new state value.

Anyway, now that all the PowerUp processing is actually happening the
hardware is working fine. Thanks to everybody for their help on this
problem.

What Doran said earlier now seems more compelling:

Obligatory plug: if you are going through the effort of rewriting the
driver, you should really consider KMDF (kernel mode driver framework).
It will remove the complexity from your code with respect to how/when to
power up your device.

My OSR book pre-order is already in …

– David

Eschmann, Michael K wrote:

I’m no PCMCIA expert, but your problem does look familiar.

When you get a resume S-IRP (S0) are you requesting and then passing a
D0 IRP down the stack? You must then wait for the bus driver to
complete the D-IRP, and only then re-initializing your device after the
bus driver has turned on the device? I’d bet the remove, then add is
working because the PNP path is acceptably implemented, but the PM side
is not.

MKE.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David Lavo
Sent: Wednesday, November 09, 2005 4:07 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] PCMCIA card and resume from suspend

I think my question was badly phrased, since I didn’t mean to imply that

my START_DEVICE handler could fix up the hardware. My START_DEVICE code

is pretty simple - parse the assigned resources, save them off and map
the memory space.

My *guess* is that the hardware is getting into an invalid state when it

returns from suspend. By disabling and re-enabling the device, I
imagine that the bus is going through the normal re-initialization and
querying of the hardware and that is enough to reset it to a valid
state. Since I don’t (yet) have any docs about the hardware at all, I
don’t know if this a valid guess, but what else does a disable/enable
cycle do?

Thanks …

Tim Roberts wrote:

>David Lavo wrote:
>
>
>>I understand what you’re saying - the correct place to do this reinit

>>is at these power state transition points. But I don’t know how to
>>actually do the reinit: I don’t have enough information about the
>>hardware itself to do so directly, but it seems that having the bus
>>reinitialize the device works just fine.
>>
>>So how do I either generate a STOP[START]_DEVICE myself, or force the

>>bus to restart/reassign the device?
>
>
>I’d like to expand just a bit on Doron’s reply to emphasize the
>disconnect here.
>
>STOP_DEVICE and START_DEVICE are not commands to the hardware or to

the

>bus. Rather, they are simply messages that tell you that something
>happened. If your device gets fixed up during START_DEVICE

processing,

>that means that YOUR DRIVER fixed it up in its START_DEVICE handler.
>That suggests that you need to run your START_DEVICE handler when you
>come out of suspend.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@intel.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

> I think the PM code is ok - I’m using almost completely unchanged sample

code from Walter Oney’s book, and it does exactly as you describe. But,

Just reinit your hardware normally in the D0 power IRP path up (after it was
travelled thru the lower drivers).

This is the way to go. No need in start/stop.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com