Filter PowerDown Behaviour

Hi All!

I’m trying to implement a “raid-like” acceleration driver.
I wrote a WDM driver to that divert IO from a disk 0 (where the OS resides) to another disk (say disk 1)

During shutdown, I get the following weird behavior. The system notifies Disk 1 that the power state has changed.
I pass all power requests down to the next driver and continue.
Shortly after, I receive an I/O request to disk 0, and I redirect it to disk 1.
The call to IoCallDriver returns a STATUS_PENDING, but the completion routine is never called.
Naturally, since the completion is never called, I never complete the original IRP, and eventually the system BugChecks on an invalid_power_state.

This only happens in Vista, while XP (sp2) works perfectly.

Vista can change power status asynchronous and XP sp2 can not. If a device power status has been changed but the driver for this device didn’t unload, the driver will queue all the IO request to the device untill the device power status resume to D0.

So in your design. If the power status of disk1 has been changed (suspend or powerdown), all the IO request to disk1 should be cancelled or return failed since disk1 can not handle any IO request any more untill disk1 power status resume to D0.

> Vista can change power status asynchronous and XP sp2 can not
I am confused by this statement. Power irps have always been asynchronous.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@yahoo.com.cn
Sent: Thursday, May 01, 2008 3:54 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Filter PowerDown Behaviour

Vista can change power status asynchronous and XP sp2 can not. If a device power status has been changed but the driver for this device didn’t unload, the driver will queue all the IO request to the device untill the device power status resume to D0.

So in your design. If the power status of disk1 has been changed (suspend or powerdown), all the IO request to disk1 should be cancelled or return failed since disk1 can not handle any IO request any more untill disk1 power status resume to D0.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer