How to know which driver is the power policy owner

We have some problems on power policy owners under Windows.
libusb-win32’s kernel driver libusb0.sys (wdm driver) can work
as a device driver or as a filter driver. When it is used a device
driver, there are not many issues and most of the users are
happy with it so far, especially now that we have the proper
KMCS compliant digital signature.

In the filter mode, the existing release acts as class filter (for USB
device class and other device class which can be USB device) and it is
very tricky to get right. So we will change to promote the use of the filter
driver to be attached to certain device only in the next release (libusb0.sys
only acts as a upper filter driver for the device of interests). We believe
this is much safer.

You can take a look at the following.
http://libusb-win32.svn.sourceforge.net/viewvc/libusb-win32/branches/libusb-testing/src/install-filter-help.txt?revision=359&view=markup

Still we’d like to get the class filter driver to work better and
not causing potential BSODs… We would like to know if it is possible
to tell which driver is acting as the power policy owner for a USB
device. Is this possible?

Reference: bug report from Tim Roberts.
http://sourceforge.net/tracker/?func=detail&aid=2658937&group_id=78138&atid=552262


Xiaofan

There is no generic programatic way to figure out who the ppo in a stack is. Some FDOs like serial.sys check a reg key, but that is not the normal case. The driver just knows implicitly if it is the PPO or not.

For a generic driver like yours, you need to be configurable at adddevice() init time, which means a ref value in the devnode because an app cannot open you device at this time.

d

dent from a phpne with no keynoard

-----Original Message-----
From: Xiaofan Chen
Sent: September 27, 2010 2:25 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to know which driver is the power policy owner

We have some problems on power policy owners under Windows.
libusb-win32’s kernel driver libusb0.sys (wdm driver) can work
as a device driver or as a filter driver. When it is used a device
driver, there are not many issues and most of the users are
happy with it so far, especially now that we have the proper
KMCS compliant digital signature.

In the filter mode, the existing release acts as class filter (for USB
device class and other device class which can be USB device) and it is
very tricky to get right. So we will change to promote the use of the filter
driver to be attached to certain device only in the next release (libusb0.sys
only acts as a upper filter driver for the device of interests). We believe
this is much safer.

You can take a look at the following.
http://libusb-win32.svn.sourceforge.net/viewvc/libusb-win32/branches/libusb-testing/src/install-filter-help.txt?revision=359&view=markup

Still we’d like to get the class filter driver to work better and
not causing potential BSODs… We would like to know if it is possible
to tell which driver is acting as the power policy owner for a USB
device. Is this possible?

Reference: bug report from Tim Roberts.
http://sourceforge.net/tracker/?func=detail&aid=2658937&group_id=78138&atid=552262


Xiaofan


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