On 09/06/2010 15:26, Doron Holan wrote:
Have you tried not specifying the powwe caps? Kmdf will use the parent’s caps.
Thank you for your help,
The parent for these devices is variable. It may be a PCI device, or it
may be a “Singleton” Root device created in the coinstaller via
SetupDiCreateDeviceInfo / SetupDiCallClassInstaller etc etc, so I was
hoping not to always rely on capabilities being proxied up the stack.
Generally, we internally proxy the wake OID requests from the NDIS
miniports to the appropriate PCI device(s) via an internal arbitration
layer, so the child devices are pretty much virtual.
Having said that, for the purposes of passing WHQL, I’m happy for this
to work with just the PCI device as parent.
These 2 lines are wrong iirc
PowerCaps->SystemWake = PowerSystemHibernate;
PowerCaps->DeviceState[PowerSystemWorking] = PowerDeviceD0;
System wake is the lightest state you can wake from. For the nic to turn off while the system is running, report PowerSystemWorking. The associated d state needs to be< D0
Apologies for querying further, maybe I misunderstood the documentation,
but I read:
*SystemWake*
A SYSTEM_POWER_STATE-typed value that indicates the lowest system
power state from which the device can send a wake signal to the
system. If this value is *PowerSystemMaximum*, the framework uses
whatever value is currently stored in the system for this member.
SYSTEM_POWER_STATE values are defined in /wdm.h/.
I thought this meant “lowest system power state” = “least powered system
state”, which in our case is hibernate - to set this at
PowerSystemWorking would mean that D0 idle would work, but then other
tests (Wake on Magic packet etc etc) would not be able to wake the
system from S3 / D3.
However, on DeviceState[PowerSystemWorking], I agree this should be set
to PowerDeviceD3. However since the device is virtual, it makes few odds
for our driver - we end up having to arbitrate on which miniports need
which PCI devices and then arbitrating, resulting in calls to
WdfDeviceStopIdle etc on the PCI devices.
MH.