Hello all:
I developed a sandwich filter driver for the usbser.sys, so my upper and filter drivers manage custom IOCTLS from applications (usb to serial). Now I want to be able to wake the system when my device receive a external signal. I was thinking to implement the PoRequestPowerIrp in the upper driver and send it to the lower filter driver and when this receives the wake signal pass it to the upper filter. Do you think this approach is feasible? Do I have to implement all the functions in the upper filter as the driver that ows the power policy?
Cheers!
Are one of your drivers the power policy owner? Only the PPO can request power irps. The WW irp needs to be sent through the entire stack (ie through usbser). It is not typical to have the lower filter pend the wait wake irp, you usually send it to the usb core and the usb core will do the wake arming (if your device needs specific programming for the wake event, the lower filter can do that and then send the WW down the stack)
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@pounceconsulting.com
Sent: Friday, February 11, 2011 3:12 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] IRP_MN_WAIT_WAKE on filter driver
Hello all:
I developed a sandwich filter driver for the usbser.sys, so my upper and filter drivers manage custom IOCTLS from applications (usb to serial). Now I want to be able to wake the system when my device receive a external signal. I was thinking to implement the PoRequestPowerIrp in the upper driver and send it to the lower filter driver and when this receives the wake signal pass it to the upper filter. Do you think this approach is feasible? Do I have to implement all the functions in the upper filter as the driver that ows the power policy?
Cheers!
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
Doron,
We’ve been sending power IRPs from filters which are not PPOs for many years with seemingly no ill effects. Yes, these IRPs travel through the whole stack so all drivers are aware of them (when that is not desirable, we tend to create child PDOs of course) but that can be managed well enough. What’s wrong with this approach?
Curious,
Ilya Faenson
Rockville, MD USA
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@microsoft.com
Sent: Friday, February 11, 2011 3:26 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] RE: IRP_MN_WAIT_WAKE on filter driver
Are one of your drivers the power policy owner? Only the PPO can request power
irps. The WW irp needs to be sent through the entire stack (ie through usbser).
It is not typical to have the lower filter pend the wait wake irp, you usually
send it to the usb core and the usb core will do the wake arming (if your device
needs specific programming for the wake event, the lower filter can do that and
then send the WW down the stack)
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@pounceconsulting.com
Sent: Friday, February 11, 2011 3:12 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] IRP_MN_WAIT_WAKE on filter driver
Hello all:
I developed a sandwich filter driver for the usbser.sys, so my upper and filter
drivers manage custom IOCTLS from applications (usb to serial). Now I want to be
able to wake the system when my device receive a external signal. I was thinking
to implement the PoRequestPowerIrp in the upper driver and send it to the lower
filter driver and when this receives the wake signal pass it to the upper
filter. Do you think this approach is feasible? Do I have to implement all the
functions in the upper filter as the driver that ows the power policy?
Cheers!
There is no way to test the PPO for the arrival of power irps it did not request, its power policy state machine would be horrifically huge to accommodate someone else sending a power irp in all cases. Right now you are getting away with it. That does not mean it is a supported or maintainable scenario in the future. Also, kmdf takes an aggressive stance here and actively tries to detect this scenario and break in when detected.
d
dent from a phine with no keynoard
-----Original Message-----
From: xxxxx@hotmail.com
Sent: Friday, February 11, 2011 6:30 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] IRP_MN_WAIT_WAKE on filter driver
Doron,
We’ve been sending power IRPs from filters which are not PPOs for many years with seemingly no ill effects. Yes, these IRPs travel through the whole stack so all drivers are aware of them (when that is not desirable, we tend to create child PDOs of course) but that can be managed well enough. What’s wrong with this approach?
Curious,
Ilya Faenson
Rockville, MD USA
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@microsoft.com
Sent: Friday, February 11, 2011 3:26 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] RE: IRP_MN_WAIT_WAKE on filter driver
Are one of your drivers the power policy owner? Only the PPO can request power
irps. The WW irp needs to be sent through the entire stack (ie through usbser).
It is not typical to have the lower filter pend the wait wake irp, you usually
send it to the usb core and the usb core will do the wake arming (if your device
needs specific programming for the wake event, the lower filter can do that and
then send the WW down the stack)
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@pounceconsulting.com
Sent: Friday, February 11, 2011 3:12 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] IRP_MN_WAIT_WAKE on filter driver
Hello all:
I developed a sandwich filter driver for the usbser.sys, so my upper and filter
drivers manage custom IOCTLS from applications (usb to serial). Now I want to be
able to wake the system when my device receive a external signal. I was thinking
to implement the PoRequestPowerIrp in the upper driver and send it to the lower
filter driver and when this receives the wake signal pass it to the upper
filter. Do you think this approach is feasible? Do I have to implement all the
functions in the upper filter as the driver that ows the power policy?
Cheers!
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
Good to know, Doron, thanks for the elaboration!
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@microsoft.com
Sent: Friday, February 11, 2011 6:26 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] RE: IRP_MN_WAIT_WAKE on filter driver
There is no way to test the PPO for the arrival of power irps it did not
request, its power policy state machine would be horrifically huge to
accommodate someone else sending a power irp in all cases. Right now you are
getting away with it. That does not mean it is a supported or maintainable
scenario in the future. Also, kmdf takes an aggressive stance here and actively
tries to detect this scenario and break in when detected.
d
dent from a phine with no keynoard
-----Original Message-----
From: xxxxx@hotmail.com
Sent: Friday, February 11, 2011 6:30 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] IRP_MN_WAIT_WAKE on filter driver
Doron,
We’ve been sending power IRPs from filters which are not PPOs for many years
with seemingly no ill effects. Yes, these IRPs travel through the whole stack
so all drivers are aware of them (when that is not desirable, we tend to create
child PDOs of course) but that can be managed well enough. What’s wrong with
this approach?
Curious,
Ilya Faenson
Rockville, MD USA
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@microsoft.com
Sent: Friday, February 11, 2011 3:26 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] RE: IRP_MN_WAIT_WAKE on filter driver
Are one of your drivers the power policy owner? Only the PPO can request power
irps. The WW irp needs to be sent through the entire stack (ie through usbser).
It is not typical to have the lower filter pend the wait wake irp, you usually
send it to the usb core and the usb core will do the wake arming (if your device
needs specific programming for the wake event, the lower filter can do that and
then send the WW down the stack)
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@pounceconsulting.com
Sent: Friday, February 11, 2011 3:12 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] IRP_MN_WAIT_WAKE on filter driver
Hello all:
I developed a sandwich filter driver for the usbser.sys, so my upper and filter
drivers manage custom IOCTLS from applications (usb to serial). Now I want to be
able to wake the system when my device receive a external signal. I was thinking
to implement the PoRequestPowerIrp in the upper driver and send it to the lower
filter driver and when this receives the wake signal pass it to the upper
filter. Do you think this approach is feasible? Do I have to implement all the
functions in the upper filter as the driver that ows the power policy?
Cheers!
Doron;
Can not the usbser.sys be bypassed? Do I have to send the WW irp through it? I mean the lower filter trap the usb configuration of my device and expose an interface to the upper filter so in fact I can access directly the PDO from the upper filter. If I have to generate the WW irp in the upper filter and pass it to the usbser, the usbser also will pass it to my lower filter (as an analogy to the usbser blocks custom ioctls)?
Cheers!
The rule is that all power irps must travel through the entire stack. There is also a rule that if you don’t handle a power irp you send it down the stack. See what happens if you send the WW irp through the entire stack. Also, driver verifier might catch you breaking the rules.
d
dent from a phine with no keynoard
-----Original Message-----
From: xxxxx@pounceconsulting.com
Sent: Friday, February 11, 2011 9:56 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] IRP_MN_WAIT_WAKE on filter driver
Doron;
Can not the usbser.sys be bypassed? Do I have to send the WW irp through it? I mean the lower filter trap the usb configuration of my device and expose an interface to the upper filter so in fact I can access directly the PDO from the upper filter. If I have to generate the WW irp in the upper filter and pass it to the usbser, the usbser also will pass it to my lower filter (as an analogy to the usbser blocks custom ioctls)?
Cheers!
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