KM DF:EvtDeviceD0Entry not getting called

Hi,

I am implementing KMDF driver for USB device and device doen’t support Remote wakeup.

Now if I don’t specify IdleCannotWakeFromS0 in idleSettings.IdleCaps then it doesn’t enable selective suspend.
But if my system is in Sleep state and when resuming from system sleep(Sx state) driver’s EvtDeviceD0Entry gets called.

Now, if I specify IdleCannotWakeFromS0 in idleSettings.IdleCaps to enable selective suspend then selective suspend works fine.
But in this case, resuming from system sleep(Sx state) why driver’s EvtDeviceD0Entry is not getting called?

I am getting same behavior on both windows Xp and windows 7.

Regards,
Foram

Kmdf will keep the device in Dx until there is a need to have the device in d0 in this scenario . Basically, it will stay in dx until a power reference is taken, usually by a power managed queue when a request arrives.

d

debt from my phone

-----Original Message-----
From: xxxxx@slscorp.com
Sent: Sunday, July 31, 2011 10:49 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] KM DF:EvtDeviceD0Entry not getting called

Hi,

I am implementing KMDF driver for USB device and device doen’t support Remote wakeup.

Now if I don’t specify IdleCannotWakeFromS0 in idleSettings.IdleCaps then it doesn’t enable selective suspend.
But if my system is in Sleep state and when resuming from system sleep(Sx state) driver’s EvtDeviceD0Entry gets called.

Now, if I specify IdleCannotWakeFromS0 in idleSettings.IdleCaps to enable selective suspend then selective suspend works fine.
But in this case, resuming from system sleep(Sx state) why driver’s EvtDeviceD0Entry is not getting called?

I am getting same behavior on both windows Xp and windows 7.

Regards,
Foram


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

Hi,

Thanks for your reply.

As you have stated KMDF will put device in d0 when required.

In this case, there is pending IO request in driver’s power managed IO queue which is immediately delivered to the driver when system resumes from sleep and i IdleCannotWakeFromS0 is not specified in idleSettings.IdleCaps.

But if IdleCannotWakeFromS0 is specified in idleSettings.IdleCaps then driver is not getting any request delivered from framework ,though requests are still pending in the driver’s power managed queue.

Regards,
Foram

How do you know there are requests that are not waking the device up? What does !wdfkd.wdfioqueues say when you are in this state?

d

debt from my phone

-----Original Message-----
From: xxxxx@slscorp.com
Sent: Monday, August 01, 2011 12:00 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] KM DF:EvtDeviceD0Entry not getting called

Hi,

Thanks for your reply.

As you have stated KMDF will put device in d0 when required.

In this case, there is pending IO request in driver’s power managed IO queue which is immediately delivered to the driver when system resumes from sleep and i IdleCannotWakeFromS0 is not specified in idleSettings.IdleCaps.

But if IdleCannotWakeFromS0 is specified in idleSettings.IdleCaps then driver is not getting any request delivered from framework ,though requests are still pending in the driver’s power managed queue.

Regards,
Foram


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

Hi,

I have got the problem.

In my driver i have registered EvtIoStop event callback function. So when device leaves the D0 state, if any request is pending which is owned by the driver is acknowledged using WdfRequestStopAcknowledge with requeue parameter set to false and I am forwarding that request to manual queue wich is not power managed.

Now when device back in D0 state EvtDeviceD0Entry gets called in which i start processing the requests which is previously stored in manual queue.

But driver’s EvtDeviceD0Entry is not getting called when system comes to working state so requests are pending in manual queue.

One more thing is i have also registered EvtIoResume callback function which is also not getting called for any acknowledged request.

Is there something i am missing here??

Regards,
Foram