Hi all,
My driver is a disk upperfilter driver and here is my IRP_MJ_POWER routine code.
NTSTATUS
DiskPerfDispatchPower(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
)
{
PDEVICE_EXTENSION deviceExtension;
#if (NTDDI_VERSION < NTDDI_VISTA)
PoStartNextPowerIrp(Irp);
IoSkipCurrentIrpStackLocation(Irp);
deviceExtension = (PDEVICE_EXTENSION)DeviceObject->DeviceExtension;
return PoCallDriver(deviceExtension->TargetDeviceObject, Irp);
#else
IoSkipCurrentIrpStackLocation(Irp);
deviceExtension = (PDEVICE_EXTENSION)DeviceObject->DeviceExtension;
return IoCallDriver(deviceExtension->TargetDeviceObject, Irp);
#endif
} // end DiskPerfDispatchPower
I copied these code from Diskperf.c and it performs well on Windows Server 2003, but when it runs on Windows Server 2000, it shows messages like this:
Waiting on: \Driver???? 82412300 irp (8223dce8) SetPower-Shutdown status
c00000bb
when these messages repeated, the computer will not shut down.
I find a question very like this, but it seems there is no answer. http://www.osronline.com/showThread.cfm?link=79332
Any help will be greatful.
What build window did you build the driver in that is failing. I am guessing vista/server 2008/win7 and you are running the NTDDI_VISTA code while you should really be running the opposite set of code
d
Sent from my phone with no t9, all spilling mistakes are not intentional.
-----Original Message-----
From: kuangnuzhiren@163.com
Sent: Monday, September 14, 2009 1:46 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Waiting on: \Driver???? 82412300 irp (8223dce8) SetPower-Shutdown status
Hi all,
My driver is a disk upperfilter driver and here is my IRP_MJ_POWER routine code.
NTSTATUS
DiskPerfDispatchPower(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
)
{
PDEVICE_EXTENSION deviceExtension;
#if (NTDDI_VERSION < NTDDI_VISTA)
PoStartNextPowerIrp(Irp);
IoSkipCurrentIrpStackLocation(Irp);
deviceExtension = (PDEVICE_EXTENSION)DeviceObject->DeviceExtension;
return PoCallDriver(deviceExtension->TargetDeviceObject, Irp);
#else
IoSkipCurrentIrpStackLocation(Irp);
deviceExtension = (PDEVICE_EXTENSION)DeviceObject->DeviceExtension;
return IoCallDriver(deviceExtension->TargetDeviceObject, Irp);
#endif
} // end DiskPerfDispatchPower
I copied these code from Diskperf.c and it performs well on Windows Server 2003, but when it runs on Windows Server 2000, it shows messages like this:
Waiting on: \Driver???? 82412300 irp (8223dce8) SetPower-Shutdown status
c00000bb
when these messages repeated, the computer will not shut down.
I find a question very like this, but it seems there is no answer. http://www.osronline.com/showThread.cfm?link=79332
—
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
I build the driver using wdk 6001.17121 windows 2000 x86 checked build environment. My computer uses windows xp for OS. On Server 2000, the code for execute is
PoStartNextPowerIrp(Irp);
IoSkipCurrentIrpStackLocation(Irp);
deviceExtension = (PDEVICE_EXTENSION)DeviceObject->DeviceExtension;
return PoCallDriver(deviceExtension->TargetDeviceObject, Irp);
Should it be
IoSkipCurrentIrpStackLocation(Irp);
deviceExtension = (PDEVICE_EXTENSION)DeviceObject->DeviceExtension;
return IoCallDriver(deviceExtension->TargetDeviceObject, Irp);
?
That is the correct code, but 6001.17121 is not a released wdk (18002 is for that kit). Use the win7 wdk and try again
d
Sent from my phone with no t9, all spilling mistakes are not intentional.
-----Original Message-----
From: kuangnuzhiren@163.com
Sent: Monday, September 14, 2009 7:02 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Waiting on: \Driver???? 82412300 irp (8223dce8) SetPower-Shutdown status
I build the driver using wdk 6001.17121 windows 2000 x86 checked build environment. My computer uses windows xp for OS. On Server 2000, the code for execute is
PoStartNextPowerIrp(Irp);
IoSkipCurrentIrpStackLocation(Irp);
deviceExtension = (PDEVICE_EXTENSION)DeviceObject->DeviceExtension;
return PoCallDriver(deviceExtension->TargetDeviceObject, Irp);
Should it be
IoSkipCurrentIrpStackLocation(Irp);
deviceExtension = (PDEVICE_EXTENSION)DeviceObject->DeviceExtension;
return IoCallDriver(deviceExtension->TargetDeviceObject, Irp);
?
—
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
Thanks, Doron
But is 7600.16385.0 a release version? And how can I judge?
Yes, it is the released version. It is labeled as such. How did you get the WDK build that you are using right now?
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of kuangnuzhiren@163.com
Sent: Monday, September 14, 2009 8:43 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Waiting on: \Driver???? 82412300 irp (8223dce8) SetPower-Shutdown status
Thanks, Doron
But is 7600.16385.0 a release version? And how can I judge?
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
I installed 6001.17121 from a CD which microsoft published(MSDN? I cann’t remeber…). I visited the homepage of microsoft just now, but I can not find a link to download 6001.18002, so I download 7600.16385.0, But it seems there is no Server 2000 build environment in it. Where can I get a 6001.18002? Thanks.
Server 2000 is ancient by now, support for windows 2000 client and server were dropped from the latest wdk. You should be able to get the 18002 wdk on connect/msdn
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of kuangnuzhiren@163.com
Sent: Monday, September 14, 2009 9:12 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Waiting on: \Driver???? 82412300 irp (8223dce8) SetPower-Shutdown status
I installed 6001.17121 from a CD which microsoft published(MSDN? I cann’t remeber…). I visited the homepage of microsoft just now, but I can not find a link to download 6001.18002, so I download 7600.16385.0, But it seems there is no Server 2000 build environment in it. Where can I get a 6001.18002? Thanks.
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
I rebuild my driver using 18002, but it seems this problem still extists.
Looks to me as if in Win2K you should be doing something more like:
IoCopyCurrentIrpStackLocationToNext(Irp);
PoStartNextPowerIrp(Irp);
before the call to PoCallDriver.
Try it, but that should make no difference. The PoStart call needs to be made when the current stack location is your device’s and the original code meets that requirement, that is why the IoSkip is after the PoStart call.
Have you enabled driver verifier on your driver?
d
Sent from my phone with no t9, all spilling mistakes are not intentional.
-----Original Message-----
From: xxxxx@ced.co.uk
Sent: Tuesday, September 15, 2009 7:23 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Waiting on: \Driver???? 82412300 irp (8223dce8) SetPower-Shutdown status
Looks to me as if in Win2K you should be doing something more like:
IoCopyCurrentIrpStackLocationToNext(Irp);
PoStartNextPowerIrp(Irp);
before the call to PoCallDriver.
—
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
> Should it be
IoSkipCurrentIrpStackLocation(Irp);
deviceExtension = (PDEVICE_EXTENSION)DeviceObject->DeviceExtension;
return IoCallDriver(deviceExtension->TargetDeviceObject, Irp);
No. w2k also needs PoXxx calls.
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
Still can not shutdown normally. My driver is a disk upper filter driver. And I find 82412300 in the prompt ‘Waiting on: \Driver???? 82412300 irp (8223dce8) SetPower-Shutdown status c00000bb’ is my filter device for a disk. If I had one disk on the computer, it can shutdown normally, but when I have two disks, it will not shutdown. What’s the difference between the two situations? Which part of my driver could be wrong, Power? Shutdown?
Thanks for help.
Fixed.
I add these code ‘filterDeviceObject->Flags |= DO_POWER_PAGABLE’ in my AddDeviceRoutine and respond to the IRP_MN_DEVICE_USAGE_NOTIFICATION IRP in my DispatchPnp routine(the code executed is just like diskperf), then it performs well.
It seems my FiDO which is not attached to a boot disk should have the ability to do power pageable. Or maybe my boot disk FiDO should also have that ability, but the flag is cleared by a device usage notification. Is that right? How does that flag influence shutdown? And what influence will take to my driver if I set this flag?
Thanks.
If I make this modification without respond to the IRP_MN_DEVICE_USAGE_NOTIFICATION IRP, will it be still right?
As a filter you need to set DO_POWER_PAGABLE if and only if the device you are attaching to (not the PDO) also has it set in its Flags field. Then upon an usage notification enable (hiber, dump stack, crash dump) you must clear this flag
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of kuangnuzhiren@163.com
Sent: Thursday, September 17, 2009 11:53 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Waiting on: \Driver???? 82412300 irp (8223dce8) SetPower-Shutdown status
If I make this modification without respond to the IRP_MN_DEVICE_USAGE_NOTIFICATION IRP, will it be still right?
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
But it seems diskperf it by default. Am I wrong?
Windows 2000 and later drivers that can be paged must set the DO_POWER_PAGABLE flag. This concept ‘page’ here is far away from the category that ‘PAGED_CODE’ refers to, they are absolutely two different concepts, right?
Right… BY DEFAULT. (a) Do you REALLY want your driver to have any pageable code??? Think about it… why is this a good idea (b) You must set DO_POWER_PAGABLE based on the device below you and clear it if you’re in the storage stack based on usage notification.
No… pagable means “pageable” (it’s just a misspelling). The DO_POWER_PAGABLE bit controls the IRQL at which your power dispatch routine will be called… when set, you’re guaranteed it won’t be called at IRQL DISPATCH_LEVEL.
Peter
OSR