BUS-device power management question

Hi All!

Does the BUS-driver should send a power-IRP to its each child-PDO when it
receive a device-power IRP to the its FDO ?
Or this will be done by System Power Manager ?

The power policy owner in any device stack is the device whose driver is
responsible for requesting a device power IRP in response to a received
system power IRP. The power policy owner is typically, (almost always), the
FDO device. So, the bus driver would only handle requesting device power
IRPs for the stack in which it is the driver for the FDO device. For the
PDO stacks the drivers for the FDO devices, which layer over the PDO
drivers, will typically be responsible for requesting device power IRPs for
those stacks. The system power manager never handles the system to device
power mapping issues, as these mappings are hardware specific.


Bill McKenzie

“Leo Yuriev” wrote in message news:xxxxx@ntdev…
>
> Hi All!
>
> Does the BUS-driver should send a power-IRP to its each child-PDO when it
> receive a device-power IRP to the its FDO ?
> Or this will be done by System Power Manager ?
>
>

Oh, and its late so I am not thinking this through well. You probably were
asking to know the following:

Also, you don’t generally have to worry in a bus about your child devices
changing power states without the parent tracking. For example, if say the
FDO and all child PDO device stacks were powered down to PowerDeviceD3, and
your bus driver got an IRP_MN_SET_POWER in its FDO stack for system power
state S0. The bus can rest assured at this point that it has received the
system power change notification in the FDO stack before any of its child
stacks have. The converse is true for a power down situation. If the bus
receives a SET indicating a less powered system state, the child stacks
would have received it first.

Now, where this breaks down on 2000/XP is where the devices handle their own
power. If the child FDO drivers handle power as the Microsoft ‘On Now’
power management white paper suggests, and they request a device power IRP
to power themselves down when not in use, and consequently power themselves
up when something triggers a break in idle activity, like say a handle being
opened to the device, (like WinDK does by default). Further, if the bus
driver is designed to follow this same Microsoft power spec and power the
bus down when all of the child devices have powered down, (as WinDK’s bus
driver support does by default). Then it is required that the bus driver
monitor power changes. For example if the bus and all its child devices are
completely powered down, and an attempt is made to open a handle to a child
device, then the child FDO driver, sitting over the child PDO of the bus
will request a device power IRP to power itself up. The PDO in this case
needs to track this and do something to cause the FDO portion of the bus
driver to request a power IRP to power itself up before the child device is
allowed to power up. Similarily, the bus needs to ensure that it is never
in a lower device power state than that of its most powered child device.

All this said, on 98/Me you don’t ever have to worry about any of this, as
it appears the power manager ensures that the FDO and PDO stacks will always
be sent the proper power IRPs in the proper order to ensure that the FDO
portion of the bus is always at a more powered power state than any of its
children.

Think I should write this up formally somewhere?


Bill McKenzie

“Leo Yuriev” wrote in message news:xxxxx@ntdev…
>
> Hi All!
>
> Does the BUS-driver should send a power-IRP to its each child-PDO when it
> receive a device-power IRP to the its FDO ?
> Or this will be done by System Power Manager ?
>
>