none
Handling queued requests RRS feed

  • Question

  • In my kmdf bus driver, I am forwarding an internal IOCtl request received in a child device PDO to the parent bus driver via

    WdfRequestForwardToParentDeviceIoQueue() for use later. This request is sent to a separate pending request queue of the bus driver. In the bus driver's EvtIOWrite request, I am retrieving the above  internal IOCtl request and completes the request. This is working fine. Then  I am trying to complete the original EvtIOWrite request. But the latter doesn't seem to happen. ie. the original write request is not completed leading to inconsistent behavior and hangs. What I am trying to achieve is the internal IOCtl should complete first, followed by the write request synchronously so that any other requests expected to the bus driver should be received later. This is something like below. I have included the skeleton code only

    VOID EvtIoWrite(WDFQUEUE Queue, WDFREQUEST Request, size_t Length) { // Retrive the pending request from the pending request queue of the parent bus // Complete the pending request // Complete the original Write as below:

    WdfRequestCompleteWithInformation( Request, status, Length ) }

    Is the way I have done this the proper manner to handle this situation? What I have missed? Is it OK to complete request in a nested manner like this?

    .
    Saturday, August 30, 2014 5:35 PM

All replies

  • it should be fine to do this. When the machine hangs, break into the kernel debugger and dump the stacks, it may give you more information such as a deadlock.

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Sunday, August 31, 2014 2:39 AM