What is the WDF interface to use to get Parent Device Power capabilities

Hi,

Is there a WDF interface to get parent device power capabilities?
I want to get the functionality equivalent of sending
IRP_MN_QUERY_CAPABILITIES to my parent device and get
its device capabilities?
If so, what is it?

Thanks,
-Praveen

Why? What are you trying to do? KMDF will do this for you and handle
all the pnp irps on your behalf. If you enumerate a PDO, it will query
for the parent’s caps when responding to query caps on the PDO. There
is no DDI to explicitly send a query caps down a stack, you must build
the WDM irp yourself and send it or use
WdfRequestWdmFormatUsingStackLocation and format a WDFREQUEST

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Praveen Kumar
Amritaluru
Sent: Friday, July 21, 2006 9:26 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] What is the WDF interface to use to get Parent Device
Power capabilities

Hi,

Is there a WDF interface to get parent device power capabilities?
I want to get the functionality equivalent of sending
IRP_MN_QUERY_CAPABILITIES to my parent device and get its device
capabilities?
If so, what is it?

Thanks,
-Praveen


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

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

In response to QUERY_DEVCAPS IRP, currently I have code similar to below for
diff sleeping states:

PDEVICE_CAPABILITIES pDevCaps;
DEVICE_CAPABILITIES DevCapsParent

if (pDevCapsParent->DeviceState[PowerSystemSleeping1] != PowerDeviceD0)
pDevCaps->DeviceState[PowerSystemSleeping1] = PowerDeviceD3;

Basically supporting lower powerstate only if parent device supports it.
Is this check necessary?

How is this information returned by various devices used by OS?

Can I just advertise device-power states supported my device w/o concerning
myself about my parents capabilities?

Thanks,
-Praveen

“Doron Holan” wrote in message
news:xxxxx@ntdev…
Why? What are you trying to do? KMDF will do this for you and handle
all the pnp irps on your behalf. If you enumerate a PDO, it will query
for the parent’s caps when responding to query caps on the PDO. There
is no DDI to explicitly send a query caps down a stack, you must build
the WDM irp yourself and send it or use
WdfRequestWdmFormatUsingStackLocation and format a WDFREQUEST

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Praveen Kumar
Amritaluru
Sent: Friday, July 21, 2006 9:26 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] What is the WDF interface to use to get Parent Device
Power capabilities

Hi,

Is there a WDF interface to get parent device power capabilities?
I want to get the functionality equivalent of sending
IRP_MN_QUERY_CAPABILITIES to my parent device and get its device
capabilities?
If so, what is it?

Thanks,
-Praveen


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

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

KMDF will use the power caps of the parent when reporting power caps for
the children. You don’t need to do anything with this unless you want
to change the specific values that are being reported.

d

– I can spell, I just can’t type.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Praveen Kumar
Amritaluru
Sent: Monday, July 24, 2006 2:54 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] What is the WDF interface to use to get Parent
Device Power capabilities

In response to QUERY_DEVCAPS IRP, currently I have code similar to below
for diff sleeping states:

PDEVICE_CAPABILITIES pDevCaps;
DEVICE_CAPABILITIES DevCapsParent

if (pDevCapsParent->DeviceState[PowerSystemSleeping1] !=
PowerDeviceD0)
pDevCaps->DeviceState[PowerSystemSleeping1] = PowerDeviceD3;

Basically supporting lower powerstate only if parent device supports
it.
Is this check necessary?

How is this information returned by various devices used by OS?

Can I just advertise device-power states supported my device w/o
concerning myself about my parents capabilities?

Thanks,
-Praveen

“Doron Holan” wrote in message
news:xxxxx@ntdev…
Why? What are you trying to do? KMDF will do this for you and handle
all the pnp irps on your behalf. If you enumerate a PDO, it will query
for the parent’s caps when responding to query caps on the PDO. There
is no DDI to explicitly send a query caps down a stack, you must build
the WDM irp yourself and send it or use
WdfRequestWdmFormatUsingStackLocation and format a WDFREQUEST

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Praveen Kumar
Amritaluru
Sent: Friday, July 21, 2006 9:26 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] What is the WDF interface to use to get Parent Device
Power capabilities

Hi,

Is there a WDF interface to get parent device power capabilities?
I want to get the functionality equivalent of sending
IRP_MN_QUERY_CAPABILITIES to my parent device and get its device
capabilities?
If so, what is it?

Thanks,
-Praveen


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

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


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

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

> if (pDevCapsParent->DeviceState[PowerSystemSleeping1] !=

PowerDeviceD0)
pDevCaps->DeviceState[PowerSystemSleeping1] = PowerDeviceD3;

You cannot relax the capabilities from the underlying stack, but you can
stricten it. So, you cannot set this field to a higher power state then it was.
If you set to PowerDeviceD3 - then I think you’re always safe.

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