Doron,
I ran a simple test of creating the PDO, then the driver loads above me
and starts sending down some requests. I handle all of them…and after
a few everything stops…
I have been stuck here for a while (and that’s when I encountered the
Queue issue). At this point I dumped the Queue and saw the following :
Dumping WDFQUEUE 0x7d3ec5b8
=========================
Parallel, Power-managed, PowerOff, Can accept, Can dispatch,
ExecutionLevelDispatch, SynchronizationScopeNone
Number of driver owned requests: 0
Number of waiting requests: 0
I am perplexed as to why my Queue is in PowerOff state…??? There are
no waiting requests…but I’m not getting any more requests because of
queue going into PowerOff.
When does KMDF put a queue in PowerOff?? How can I power it back On?
-pankaj
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Thursday, January 10, 2008 8:24 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WdfQueue Problem
The PDO is not in any state where it has been removed or reported as
missing (!wdfdevice on the parent FDO will give you the WDFCHILDLIST
that was used to enumerate the PDO, !wdfchildlist [handle] will give you
the current reported state as KMDF thinks it is) so the queue state is
just fine (power managed, off). Since (assuming) the PDO is not the
power policy owner, the queue will not present until the policy owner
wakes up the stack. I don’t understand what the problem is in the
current state.
d
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Pankaj Garg
Sent: Thursday, January 10, 2008 4:20 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WdfQueue Problem
Doron,
I was hoping you’d respond :-). I forgot to paste that outout in last
email
Dumping WDFDEVICE 0x7d38ad48
=================================
WDM PDEVICE_OBJECTs: self 82e17828
Pnp state: 119 ( WdfDevStatePnpStarted )
Power state: 31f ( WdfDevStatePowerDx )
Power Pol state: 571 ( WdfDevStatePwrPolDx )
Parent WDFDEVICE 7d42bfe8
Parent states:
Pnp state: 119 ( WdfDevStatePnpStarted )
Power state: 307 ( WdfDevStatePowerD0 )
Power Pol state: 565 ( WdfDevStatePwrPolStarted )
Since then I have started calling the WdfIoQueuePurge call in the code.
Is that something you’d recommend?
-pankaj
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Thursday, January 10, 2008 4:06 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] WdfQueue Problem
What is the current state of the PDO (!wdfkd.wdfdevice [wdfdevice]
0xfff) ?
d
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Pankaj Garg
Sent: Thursday, January 10, 2008 3:55 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WdfQueue Problem
I have a bus driver which creates Pdo’s and WDFQueue objects for thos
PDO’s. Queue is set up for parallel dispatching.
I am seeing that in some cases my PDO gets stuck and just wouldn’t go
away no matter how many times I report it missing. It was a clear
symptom of either a reference to the device or some pending IRP in the
system.
Here is the dump of my WdfQueue:
!wdfkd.wdfqueue 0x7D38C4C0
Dumping WDFQUEUE 0x7d38c4c0
=========================
Parallel, Power-managed, PowerOff, Can accept, Can dispatch,
ExecutionLevelDispatch, SynchronizationScopeNone
Number of driver owned requests: 0
Number of waiting requests: 1
!WDFREQUEST 0x7d40f258 !IRP 0x82d9b008
EvtIoDefault: (0xf427cec0) bus!Device_EvtIoDefault
EvtIoRead: (0xf427cf10) bus!Device_EvtIoRead
EvtIoWrite: (0xf427cf40) bus!Device_EvtIoWrite
EvtIoDeviceControl: (0xf427cf70) bus!Device_EvtIoDeviceControl
EvtIoInternalDeviceControl: (0xf427d2b0)
bus!Device_EvtIoInternalDeviceControl
kd> !WDFREQUEST 0x7d40f258
!IRP 0x82d9b008
!WDFQUEUE 0x7d38c4c0
State: Pending, Allocated by WDF for incoming IRP
I am 100% sure that the WdfRequest that is pending here, was never
actually delivered to me. I print every request coming into my EvtIOXXX
routines. This seems to me like this is a request that was about to be
delivered (still belongs to framework) but now its stuck.
How do I cleanup this situation? In fact what’s the best way to Stop a
queue so that this wont happen in the first place. Even if this happens,
I would like to somehow get rid of this Request while still processing
the requests that have already been given to me by the framework.
Thanks
Pankaj
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
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
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
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