WdfIoQueueGetState

When I get the state of a queue for the first time, the return value is
reported by WinDbg 0xe (No_matching_enumerant), and passing it to
WDF_IO_QUEUE_READY returns false. The two side affect fields, requests in
queue and not completed are both zero. To correct this I thought I needed
to start the queue (WdfIoQueueStart) in the AddDevice callback after the
queue is created but proved to be fruitless and resulted in no change.

It looks like I need to ask how do I set up manual queues? Our intent is
to use the OSR article “Xtreme DMA” from a few years back with two queues;
one holding requests before being h ung on the hardware and one holding
requests that have been hung on the hardware.

Gary G. Little

The value returned is a bit field, each enum value is a bit. As long as
the queue is not power managed, it is created in the on state. Load
wdfkd from the ddk overlay (not the wdfkd that shipped with the
debugger) and run !wdfkd.wdfqueue (or !wdfdevicequeues
) and send the output.

d

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

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@seagate.com
Sent: Tuesday, April 11, 2006 9:30 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] WdfIoQueueGetState

When I get the state of a queue for the first time, the return value is
reported by WinDbg 0xe (No_matching_enumerant), and passing it to
WDF_IO_QUEUE_READY returns false. The two side affect fields, requests
in
queue and not completed are both zero. To correct this I thought I
needed
to start the queue (WdfIoQueueStart) in the AddDevice callback after the
queue is created but proved to be fruitless and resulted in no change.

It looks like I need to ask how do I set up manual queues? Our intent is
to use the OSR article “Xtreme DMA” from a few years back with two
queues;
one holding requests before being h ung on the hardware and one holding
requests that have been hung on the hardware.

Gary G. Little


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

Here is the dump, and my queue creation. I’m not including the queue
context creation but can if that has bearing.

WDF_IO_QUEUE_CONFIG_INIT(&ioQueueConfig, WdfIoQueueDispatchManual);
WDF_OBJECT_ATTRIBUTES_INIT(&attributes);
ioQueueConfig.EvtIoCanceledOnQueue = OseEvtCanceledOnIoQueue;
WDF_OBJECT_ATTRIBUTES_SET_CONTEXT_TYPE(&attributes, tQueueContext);

//ioQueueConfig.EvtIoDefault = (PFN_WDF_IO_QUEUE_IO_DEFAULT) NULL; // TO
BE DONE
status = WdfIoQueueCreate(
pOseFdo->OseDevice,
&ioQueueConfig,
WDF_NO_OBJECT_ATTRIBUTES,
&pCmdQue->InboundQ
);

2: kd> !wdfkd.wdfqueue 0x79e67bc8

Dumping WDFQUEUE 0x79e67bc8

Manual, Power-managed, PowerOn, Cannot accept, Can dispatch,
ExecutionLevelDispatch, SynchronizationScopeNone
Number of driver owned requests: 0
Number of waiting requests: 0

EvtIoCanceledOnQueue: (0xf51b0390) Sk_SiI3124!OseEvtCanceledOnIoQueue

Gary G. Little

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Tuesday, April 11, 2006 11:36 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WdfIoQueueGetState

The value returned is a bit field, each enum value is a bit. As long as
the queue is not power managed, it is created in the on state. Load
wdfkd from the ddk overlay (not the wdfkd that shipped with the
debugger) and run !wdfkd.wdfqueue (or !wdfdevicequeues
) and send the output.

d

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

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@seagate.com
Sent: Tuesday, April 11, 2006 9:30 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] WdfIoQueueGetState

When I get the state of a queue for the first time, the return value is
reported by WinDbg 0xe (No_matching_enumerant), and passing it to
WDF_IO_QUEUE_READY returns false. The two side affect fields, requests
in
queue and not completed are both zero. To correct this I thought I
needed
to start the queue (WdfIoQueueStart) in the AddDevice callback after the
queue is created but proved to be fruitless and resulted in no change.

It looks like I need to ask how do I set up manual queues? Our intent is
to use the OSR article “Xtreme DMA” from a few years back with two
queues;
one holding requests before being h ung on the hardware and one holding
requests that have been hung on the hardware.

Gary G. Little


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

Like all power managed queues, it will be able to accept i/o after the
device has been powered on. The power on sequence is

EvtDevicePrepareHardware (only when resources are assigned or
rebalanced)
EvtDeviceD0Entry
EvtInterruptEnable(for all of your interrupts)
EvtDeviceD0EntryPostInterruptsEnabled
EvtDeviceDma callbacks (there are 3 of them, can’t remember the order)
Turn on power managed queues
EvtDeviceSelfManagedIoInit/Restart

d

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

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@seagate.com
Sent: Tuesday, April 11, 2006 9:59 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WdfIoQueueGetState

Here is the dump, and my queue creation. I’m not including the queue
context creation but can if that has bearing.

WDF_IO_QUEUE_CONFIG_INIT(&ioQueueConfig, WdfIoQueueDispatchManual);
WDF_OBJECT_ATTRIBUTES_INIT(&attributes);
ioQueueConfig.EvtIoCanceledOnQueue = OseEvtCanceledOnIoQueue;
WDF_OBJECT_ATTRIBUTES_SET_CONTEXT_TYPE(&attributes, tQueueContext);

//ioQueueConfig.EvtIoDefault = (PFN_WDF_IO_QUEUE_IO_DEFAULT) NULL; // TO
BE DONE
status = WdfIoQueueCreate(
pOseFdo->OseDevice,
&ioQueueConfig,
WDF_NO_OBJECT_ATTRIBUTES,
&pCmdQue->InboundQ
);

2: kd> !wdfkd.wdfqueue 0x79e67bc8

Dumping WDFQUEUE 0x79e67bc8

Manual, Power-managed, PowerOn, Cannot accept, Can dispatch,
ExecutionLevelDispatch, SynchronizationScopeNone
Number of driver owned requests: 0
Number of waiting requests: 0

EvtIoCanceledOnQueue: (0xf51b0390)
Sk_SiI3124!OseEvtCanceledOnIoQueue

Gary G. Little

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Tuesday, April 11, 2006 11:36 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WdfIoQueueGetState

The value returned is a bit field, each enum value is a bit. As long as
the queue is not power managed, it is created in the on state. Load
wdfkd from the ddk overlay (not the wdfkd that shipped with the
debugger) and run !wdfkd.wdfqueue (or !wdfdevicequeues
) and send the output.

d

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

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@seagate.com
Sent: Tuesday, April 11, 2006 9:30 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] WdfIoQueueGetState

When I get the state of a queue for the first time, the return value is
reported by WinDbg 0xe (No_matching_enumerant), and passing it to
WDF_IO_QUEUE_READY returns false. The two side affect fields, requests
in
queue and not completed are both zero. To correct this I thought I
needed
to start the queue (WdfIoQueueStart) in the AddDevice callback after the
queue is created but proved to be fruitless and resulted in no change.

It looks like I need to ask how do I set up manual queues? Our intent is
to use the OSR article “Xtreme DMA” from a few years back with two
queues;
one holding requests before being h ung on the hardware and one holding
requests that have been hung on the hardware.

Gary G. Little


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


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