Freddie Witherden
2010-09-30 18:29:43 UTC
Hi all,
I've been playing around with the 1394 vdev_hybrid stack for the past
few weeks. Recently, I've been looking and the ASYNC_READ and
ASYNC_WRITE IOCTLs. However, bizarrely, I have been unable to get the
READ/WRITE request to work.
Broadly speaking, in the sample, the IOCTL handler dispatches
IOCTL_ASYNC_READ requests to the kmdf1394_AsyncRead function which
creates an MDL from the user-supplied buffer, allocates an 1394-stack
IRB, fills it out and then calls kmdf1394_SubmitIrpAsync. This
function just formats the Request (the same Request provided to the
IOCTL handler by the WDF) using
WdfIoTargetFormatRequestForInternalIoctlOthers and then calls
WdfRequestSend.
Investigation in shows that once submitted the request is failing with
STATUS_INVALID_PARAMETER (as determined from the completion routine).
In desperation I replaced the call to kmdf1394_SubmitIrpAsync to
kmdf1394_SubmitIrpSynch. It worked. No errors, no issues, and the
expected data bubbles its way up to user space. SubmitIrpSynch just
calls WdfIoTargetSendInternalIoctlOthersSynchronously.
Hence my question is: what could cause Async requests to fail but
Synch requests to succeed?
Regards, Freddie.
I've been playing around with the 1394 vdev_hybrid stack for the past
few weeks. Recently, I've been looking and the ASYNC_READ and
ASYNC_WRITE IOCTLs. However, bizarrely, I have been unable to get the
READ/WRITE request to work.
Broadly speaking, in the sample, the IOCTL handler dispatches
IOCTL_ASYNC_READ requests to the kmdf1394_AsyncRead function which
creates an MDL from the user-supplied buffer, allocates an 1394-stack
IRB, fills it out and then calls kmdf1394_SubmitIrpAsync. This
function just formats the Request (the same Request provided to the
IOCTL handler by the WDF) using
WdfIoTargetFormatRequestForInternalIoctlOthers and then calls
WdfRequestSend.
Investigation in shows that once submitted the request is failing with
STATUS_INVALID_PARAMETER (as determined from the completion routine).
In desperation I replaced the call to kmdf1394_SubmitIrpAsync to
kmdf1394_SubmitIrpSynch. It worked. No errors, no issues, and the
expected data bubbles its way up to user space. SubmitIrpSynch just
calls WdfIoTargetSendInternalIoctlOthersSynchronously.
Hence my question is: what could cause Async requests to fail but
Synch requests to succeed?
Regards, Freddie.